Cannot get output from the JS course console

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

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

1 Like

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 =)!

1 Like

Same, doesn’t appear to work.

1 Like

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

1 Like

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

1 Like

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?

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.

2 Likes

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.

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

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.

2 Likes

@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 .
1 Like

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.

This has been answered here in numerous ways, but I think it could use a clear, simple answer:

This:
image

Is not actually supposed to produce an output here, in the lesson’s bottom-right pane:

/**
* Your test output will go here.
*/

(Although it does look like it, if you’re not familiar with js).
If you want to see an output here, you have to do something like:
console.log(myFunction(10));
The idea is that you’ll learn about console.log in later lessons; but I agree it’s confusing.

1 Like

Yessss! It definitely does look like it! It seems like it would show the output.

It’s been driving me nuts! The bottom left has tests that should work and the code has test values that we are supposed to change to test our code. Yet, it doesn’t show me anything. I would love to get a simple:

=> false

or

=> true

Hey @ChiefOopsmaster,

If you’d like that kind of output, you can get it by simply enclosing the function you want to see the output of with

console.log(myFunction(inputValue));

That’ll show you quite clearly whether your function works; and it’s good practice, as it’s a key method of de-bugging in a real coding environment.