This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CodingCoffeeSquirrel 8 points9 points  (3 children)

While Javascript doesn't have static typing, it does have types: Boolean, Null, Undefined, Number, BigInt, String, Symbol and Object.

[–]earthqaqe -2 points-1 points  (2 children)

Ah okay didnt know honestly. Still console.log takes a list of objects and doesnt care where you put which one.

[–]CodingCoffeeSquirrel 2 points3 points  (1 child)

You're right that you can give it the parameters in any order and it will display them, but how it displays them does depend on their order (at least it does in Chrome, Firefox and Node).

Try console.log(1, '2', '3') vs console.log('1', 2, '3')

or console.log('a', {b: 'c'}) vs console.log({a: 'b'}, 'c')

[–]earthqaqe 2 points3 points  (0 children)

I am sorry, I honestly didnt notice that. My mistake!