Skip to content
Medium-Easy Understand JavaScript & TypeScript multiple_choice

Which of the following creates a SHALLOW copy of an object?

Understand — Tests comprehension and ability to explain concepts.

Answer Options

A JSON.parse(JSON.stringify(obj))
B Object.assign({}, obj)
C structuredClone(obj)
D Object.freeze(obj)

Want to see the correct answer?

Get the answer with a detailed explanation, plus practice 20+ more JavaScript & TypeScript questions with adaptive quizzes and timed interviews.

See the Answer on Guru Sishya →

This question is from the JavaScript & TypeScript topic (Programming Languages).

More JavaScript & TypeScript Questions