Skip to content
RED SAG Skills
hardStudy question · answer published in JavaScript interview questions, so no pointsjavascriptsymbols

Symbol keys and JSON

What does this print?

const id = Symbol("id")
const user = { name: "Ravi", [id]: 42 }
console.log(Object.keys(user), JSON.stringify(user))
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions