Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaScriptToPrimitive coercion algorithmSingle-choice MCQ

How does `Date` differ from an ordinary object in the ToPrimitive algorithm when no explicit hint is given (the 'default' hint), and why does `new Date() + 1` produce a string?

const d = new Date(0); console.log(typeof (d + 1));