Cannot get output from the JS course console

Cannot get output from the JS course console
0

#1

I can not getting output from the js course. why I the console is not showing the output? help me


#2

Could be one bug related to FCC, you may use browser developer tools and check console for now.


#3

you can also do it in an IDE, and then look at the output. I think its a bug from FCC, hope it will be fixed soon. But the workaround above is probably best =)!


#4

Same, doesn’t appear to work.


#5

The FCC console only shows your their output. You can see all console output by going to your devtools panel. In Chrome it’s right ->click - >inspect


#6

Yeah, but i wont even see the output of my code in the FCC console.


#7

Just to make sure we’re speaking of the same thing, do you mean the results of the tests, or any console.log statements in your code?


#8

The results, i run a function and i just get ‘test completed.’ If it doesn’t work, instead of showing me what my output was to see what is wrong.


#9

I’m not sure what output you expect to see. Do you mean you don’t even see the output of the assertion? So like:

Expected func(arg) to equal [1,2] but instead got []

Is something like that what you expect? If it is, then yeah. I’ve also seen some tests fail with no assertion shown. But I was able to discern it from whatever test failed. The tests show the expected result.

If you screenshot it, that would be the best way to see what you see.


#10

Why wouldn’t it show the answer to the function in console?


#11

Because the console only shows the result of the assertions. It will only display the error message FCC wrote into a test for when it fails.

Testing suites like mocha, which is what they use, don’t give the output of the function being tested. Just whether it passes or not. The ‘tests completed’ is what mocha returns if all tests passed.

This is to keep noise down during development since unlike with FCC, these test suites run tests on every save of a file.


You also did not put any console.log statements, so you couldn’t see anything in the devtools console anyways.

If you want to see the result of a some value, you gotta do

console.log(someFunc(args))

Then you have to open up devtools to see the console output.


#13

@bgq007
You will get output … level up your lesson. next step you learn about it .
here some tips

  1. press the buttons “Ctrl” + “Shift” + “j”.
  2. use “console.log” in your code .
    such as,
    let t ="This is string ";
    console.log(“Printing :” + t);
    you will get your output printed in the browser’s development ber .

#15

7:48 shows the console that you would like: https://www.youtube.com/watch?v=ZmcKUL1Gm98. But i too do not have access to it and am only aware of navigating the external one shown in 0:48.

Furthermore, this external alternative 0:44-0:56 https://www.youtube.com/watch?v=4UrdQDkSAZc is all that i am aware of right now.