FrontendInterviews.dev

689. structuredClone and Map

Easy•

Predict the output.

const m = new Map([['a', 1]])
const c = structuredClone(m)
console.log(c instanceof Map, c.get('a'))

What is printed in the console?

Select an option and submit your answer.
Next Problem