Console log not showing anything in javascript

Console log not showing anything in javascript
0

#1

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 isnt 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?


#2

Did you open the console in your browser (using DevTools or similar)? The results window in FCC does not currently support console.log()


#3

If this is true, it will be big chrome browser embaressment

:-S


#4

Yes, I did.

If the info can be useful, I’m using Firefox.


#5

It sounds like your statement isn’t being reached. What is your code?


#6

`
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]]);
`


#7

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


#8

pythontutor helped me a lot while debugging, thanks :smile: