I’m doing the javascript challenges and trying to output the value of variables to debug, but doing console.log(myVar) in the code and the dev tools console isn
t showing anything.
(Edit: Yes I did open the dev tools console.)
(Edit: My code is
function largestOfFour(arr) { console.log(arr[0]); return arr; } largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
)
What is going on?
Did you open the console in your browser (using DevTools or similar)? The results window in FCC does not currently support console.log()
1 Like
If this is true, it will be big chrome browser embaressment
:-S
Yes, I did.
If the info can be useful, I’m using Firefox.
It sounds like your statement isn’t being reached. What is your code?
`
function largestOfFour(arr) {
console.log(arr[0]);
return arr;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
`
@KimThibault If you are using FireFox are you using Firebug add-on? It is better than the native debugger i.m.o.
Of course you could always try http://pythontutor.com/visualize.html#mode=edit to visualize your code in action.
It works by the way.
2 Likes
pythontutor helped me a lot while debugging, thanks 
1 Like