Medium-EasyUnderstandJavaScript & TypeScriptmultiple_choice

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

Understand Tests comprehension and ability to explain concepts.

Answer Options

AJSON.parse(JSON.stringify(obj))
BObject.assign({}, obj)
CstructuredClone(obj)
DObject.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