Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardNodeJSV8 hidden classesSingle-choice MCQ

Two objects are created from the same literal shape but with properties added in a different order. What is the consequence for V8's hidden classes (Maps), and why?

const a = {}; a.x = 1; a.y = 2; const b = {}; b.y = 2; b.x = 1; // a and b have DIFFERENT hidden classes