Intermediate
JavaScript
Q83 / 100
What is the structuredClone() limitation with functions?
Correct! Well done.
Incorrect.
The correct answer is B) Functions, DOM nodes, and class instances with methods cannot be structured-cloned; they throw DataCloneError
B
Correct Answer
Functions, DOM nodes, and class instances with methods cannot be structured-cloned; they throw DataCloneError
Explanation
The Structured Clone Algorithm cannot clone functions. Attempting to clone { fn: () => {} } throws DataCloneError. Plain data objects and most builtins work.
Progress
83/100