Intermediate JavaScript
Q78 / 100

What is a JavaScript realm and its security implication?

Correct! Well done.

Incorrect.

The correct answer is B) Each realm has its own global object and builtins; cross-realm instanceof checks fail, requiring Array.isArray() and structuredClone() workarounds

B

Correct Answer

Each realm has its own global object and builtins; cross-realm instanceof checks fail, requiring Array.isArray() and structuredClone() workarounds

Explanation

An iframe in the same origin has a different realm. obj instanceof Array fails for arrays created in the iframe. Use Array.isArray() for cross-realm safety.

Progress
78/100