What does the ternary operator `condition ? a : b` evaluate to when condition is false? JavaScript ProfessionalEasy Try Now
What is the purpose of `Array.prototype.sort()` default behavior? JavaScript ProfessionalEasy Try Now
What is the purpose of `Array.prototype.indexOf()` vs `Array.prototype.findIndex()`? JavaScript ProfessionalEasy Try Now
What does `Array.prototype.findIndex()` return when no element matches the condition? JavaScript ProfessionalEasy Try Now
What is the output of the following code? const handler = { set(target, prop, value) { if (typeof value !== ‘number’) throw new TypeError(‘Numbers only’); return Reflect.set(target, prop, value); } }; const numObj = new Proxy({}, handler); numObj.a = 5; numObj.b = ‘hi’; console.log(numObj.a); JavaScript ProfessionalHard Try Now
What is the purpose of the Error.cause property introduced in ES2022? JavaScript ProfessionalHard Try Now
What is the key behavioral difference between a regular function and an async function when they throw synchronously inside their body? JavaScript ProfessionalHard Try Now
What does the following code output? const a = { x: 1 }; const b = Object.create(a); b.y = 2; console.log(Object.keys(b), Object.getOwnPropertyNames(b), ‘x’ in b); JavaScript ProfessionalHard Try Now