What is the output of the following? “`js function foo() { ‘use strict’; console.log(this); } foo(); “` JavaScript DeveloperHard Try Now
What is the output of the following? “`js const sym = Symbol(‘key’); const obj = { [sym]: 42, name: ‘test’ }; console.log(Object.keys(obj)); “` JavaScript DeveloperHard Try Now
What is the difference between microtasks and macrotasks in the JavaScript event loop? JavaScript DeveloperHard Try Now
What is the output of the following? “`js let x = 1; function foo(x, y = x * 2) { return y; } console.log(foo(3)); “` JavaScript DeveloperHard Try Now
What is the output of the following? “`js const p1 = Promise.resolve(1); const p2 = Promise.reject(new Error(‘fail’)); const p3 = Promise.resolve(3); Promise.allSettled([p1, p2, p3]).then(results => { console.log(results.length); }); “` JavaScript DeveloperHard Try Now
What is the output of the following? “`js const a = [1, 2]; const b = [1, 2]; console.log(a == b, a === b); “` JavaScript DeveloperHard Try Now
What is the output of the following? “`js async function foo() { return 1; } async function bar() { return await foo(); } bar().then(console.log); “` JavaScript DeveloperHard Try Now
What is the output of the following? “`js function* gen() { yield 1; yield 2; return 3; } const g = gen(); console.log([…g]); “` JavaScript DeveloperHard Try Now
What does `Reflect.ownKeys(obj)` return compared to `Object.keys(obj)`? JavaScript DeveloperHard Try Now
What happens when you access a variable in the Temporal Dead Zone (TDZ)? JavaScript DeveloperHard Try Now
What is the output of the following code? “`js const obj = {x: 1}; Object.defineProperty(obj, ‘y’, { value: 2, writable: false, enumerable: false }); console.log(Object.keys(obj)); “` JavaScript DeveloperHard Try Now
What is the output of the following? “`js console.log(typeof class {}); “` JavaScript DeveloperHard Try Now
What is `Map` in JavaScript and how does it differ from a plain object? JavaScript DeveloperEasy Try Now