Hereโs a small snippet for you:
let user = {
first name: "John",
age = 30
};
console.log(user);
What will happen when you run this code?
Possible outcomes:
{ first name: "John", age: 30 }
SyntaxError
undefined
null
๐ฌ Your turn: Drop your answer in the comments and explain your reasoning.
I break down this and other tricky "Unexpected Token" cases in detail in my latest guide:
๐ Read the full article here
Top comments (0)