6. Arrays of arrays


#1


6. Arrays of arrays, I have absolutely no idea what is wrong.

It says: SyntaxError: Unexpected identifier


var newArray = [[1, "hello", 1], [1, "hello", 1], [1, "hello", 1]];
console.log newArray


#2

There is your unexpected identifier. This is actually a function that takes a value and outputs it to the display.

console.log(my_value);

#3

Thanks, I don't know how I missed that. It does say I passed the lesson but it just prints:
[ [ 1, 'hello', 1 ], [ 1, 'hello', 1 ], [ 1, 'hello', 1 ] ]
Is it supposed to print that?


#4

Since you are logging the entire array, yes, that is how it will output.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.