Currently working on this https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/golf-code.
I want to see returned values as I am working on the project but nothing is showing up either in FCC or in Dev tools (Chrome). I’ve tried using console.log to show in Chrome dev tools but it’s still not working.
Any thoughts?
Thanks.
Wrapping the function call inside a console.log(…) works to get the returned value displayed in both the fCC window and in the Chrome Dev Tools console, at least it seems to be working for me.
// Change these values to test
console.log(golfScore(5, 4));
Okay we’re good I placed the parentheses in the wrong place thank you.
1 Like
Hmmm! Seem to be having a similar problem, I can’t get anything to print to the fcc console, not even console.log("this won't print!");
Am I losing the plot here!!??
Not sure what might be causing that. I just tried going into a lesson and replacing all code with just a console.log(“print”) then ran the tests and was able to get the message to show up in the test output area and the chrome Dev tools console. So it being a platform issue is unlikely, though it could be specific to the lesson you are working on.
It could also be some other code is preventing your console.log from running.
On the off chance that it’s something simpler, be sure that you are scrolling down through all the other test output in the test output area and be sure you are not looking at filtered messages in the dev tools console (e.g. not filtered to just warnings and/or error messages).
If you provide the lesson you are working on and the code you’re running I can look into it further.