Skip to content
RED SAGSkills
hard20 pts · first answer countsjavascriptsymbols

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