What is the output of the following code? “`js const p = new Promise((resolve) => resolve(42)); p.then(v => v * 2) .then(v => console.log(v)); “` JavaScript AssociateMedium Try Now
What is `WeakMap` in JavaScript and how does it differ from `Map`? JavaScript AssociateMedium Try Now
What is the difference between `Object.freeze()` and `const` for objects? JavaScript AssociateMedium Try Now
What does `Promise.all()` do and what happens if one promise rejects? JavaScript AssociateMedium Try Now
What is the difference between `map()` and `forEach()` in JavaScript? JavaScript AssociateMedium Try Now
What is the output of the following code? “`js function counter() { let count = 0; return () => ++count; } const inc = counter(); console.log(inc()); console.log(inc()); “` JavaScript AssociateMedium Try Now
What is the difference between `==` and `===` when comparing `1` and `’1’`? JavaScript AssociateMedium Try Now
What is async/await in JavaScript and what type does an `async` function always return? JavaScript AssociateMedium Try Now
What is the output of the following code? “`js const arr = [1, 2, 3]; const [a, , b] = arr; console.log(a, b); “` JavaScript AssociateMedium Try Now
What does `Array.prototype.find()` return when no element satisfies the condition? JavaScript AssociateMedium Try Now