How would you fix the classic setTimeout-in-loop closure problem to log 0, 1, 2? JavaScript DeveloperMedium Try Now
What does the following code output? for (var i = 0; i < 3; i++) { setTimeout(() => console.log(i), 0); } JavaScript DeveloperMedium Try Now
What is the difference between call() and apply() when invoking a function? JavaScript DeveloperMedium Try Now
What is the output of the following? const p = new Promise(resolve => resolve(1)); p.then(v => v * 2).then(v => console.log(v)); JavaScript DeveloperMedium Try Now
What does the following code log? const obj = { a: 1 }; const copy = Object.assign({}, obj); copy.a = 99; console.log(obj.a); JavaScript DeveloperMedium Try Now
What is the result of calling a generator function without using the returned iterator? JavaScript DeveloperMedium Try Now
What is the output of: console.log(0.1 + 0.2 == 0.3, 0.1 + 0.2 === 0.3)? JavaScript DeveloperMedium Try Now
What does the following code output? console.log(typeof class {}); JavaScript DeveloperMedium Try Now