Javascript output visibility

Javascript output visibility
0

Hello!

I’m a relatively new user to this resource but one thing I’m struck by is the lack of any on page feedback. Take this, for example:

Lesson: Basic JavaScript: Iterate Odd Numbers With a For Loop
Task: Push the odd numbers from 1 through 9 to myArray using a for loop.

var myArray = [];
for (var i = 1; i < 10; i += 2) {myArray.push(i);}

Rather than having the test past/fail and having the conditions on the bottom left fulfill or not, it would be helpful to have some of the test output shown, i.e. what numbers were pushed into myArray as a result of the code.

Currently to do this, to my knowledge, one has to go to another website/medium. I don’t necessarily think this is a bad thing as it encourages people not to be too reliant on one source for learning, but on the other hand for those who do, and lazy people like me, having an inbuilt console/log would enhance the learning experience. Afterall, we can see what happens during the HTML/CSS lessons, albeit I appreciate the variable victory conditions set in the Javascript courses perhaps makes this kind of on screen feedback slightly more difficult.

Just a thought, interested to know what you think!

Hey @BuzzsawB,
Have you tried browser console?
Press F12 key when you are in browser and use the console to try out your code.

Hope this helps.

Well, the console.log() methods work in the fcc editor…

Ah nice, both good answers! I’d still recommend a more obvious output but I suppose in learning the skills one should learn the methods you two have used!

Cheers.