a couple of days ago I had a Javascript exam and the last question was:
When you evaluate the expression {} + []
what do you get?
Error
null
0
undefined
I've tested in vscode but I can get an answer :(
a couple of days ago I had a Javascript exam and the last question was:
When you evaluate the expression {} + []
what do you get?
Error
null
0
undefined
I've tested in vscode but I can get an answer :(
If you simply open your developer tools and type that expression in, you will see the return value as 0
.