What is the output of the following? “`js async function foo() { try { await Promise.reject(new Error(‘oops’)); } catch(e) { console.log(e.message); } } foo(); “` JavaScript ProfessionalMedium Try Now
What is prototype-based inheritance and how does it differ from classical class-based inheritance? JavaScript ProfessionalMedium Try Now
What is the difference between `Promise.any()` and `Promise.race()`? JavaScript ProfessionalMedium Try Now
What is the output of the following? “`js const fn = (function() { let count = 0; return { increment: () => ++count, getCount: () => count }; })(); fn.increment(); fn.increment(); console.log(fn.getCount()); “` JavaScript ProfessionalMedium Try Now
What is the output of the following code? “`js const obj = { a: 1, b: 2 }; const { a, …rest } = obj; console.log(rest); “` JavaScript ProfessionalMedium Try Now
What is the output of the following? “`js console.log([] + []); console.log({} + []); console.log([] + {}); “` JavaScript ProfessionalMedium Try Now
What is the difference between `shallow copy` and `deep copy` and which methods in JavaScript create each? JavaScript ProfessionalMedium Try Now
What is the difference between `function declarations` and `function expressions` regarding hoisting? JavaScript ProfessionalMedium Try Now
What is the difference between `null` and `undefined` in JavaScript? JavaScript ProfessionalEasy Try Now