What is the content-security-policy implication of using eval() or new Function() in JavaScript? JavaScript ProfessionalHard Try Now
What does the following code output, and what concept does it illustrate? const obj = { a: 1, b: 2, c: 3 }; const { a, …rest } = obj; console.log(rest); JavaScript ProfessionalHard Try Now
What is the difference between Atomics.wait() and Atomics.waitAsync()? JavaScript ProfessionalHard Try Now
What is the output of the following code? async function* asyncGen() { yield await Promise.resolve(1); yield await Promise.resolve(2); } (async () => { for await (const val of asyncGen()) { console.log(val); } })(); JavaScript ProfessionalHard Try Now
What does the following code output? const handler = { get: (t, k) => k in t ? t[k] : 37 }; const p = new Proxy({}, handler); p.a = 1; console.log(p.a, p.b, ‘c’ in p); JavaScript ProfessionalHard Try Now
What does V8’s hidden class (shape) optimization do and what code pattern defeats it? JavaScript ProfessionalHard Try Now
What is the significance of the ‘use strict’ directive in the context of the arguments object? JavaScript ProfessionalHard Try Now
What does the HasOwnProperty anti-pattern refer to, and what is the safer alternative? JavaScript ProfessionalHard Try Now
What is the output of the following code? function outer() { let count = 0; return function inner() { return ++count; }; } const a = outer(); const b = outer(); console.log(a(), a(), b()); JavaScript ProfessionalHard Try Now
What is the output of the following code? let x = 0; const p = new Promise(resolve => { x = 1; resolve(x); x = 2; }); p.then(v => console.log(v, x)); JavaScript ProfessionalHard Try Now
What is a potential race condition when using Atomics.compareExchange on a SharedArrayBuffer? JavaScript ProfessionalHard Try Now
What does the following code output? const obj = { x: 1, getX() { return this.x; } }; const { getX } = obj; console.log(getX()); JavaScript ProfessionalHard Try Now
What distinguishes a SharedArrayBuffer from a regular ArrayBuffer? JavaScript ProfessionalHard Try Now
What is the purpose of the [[HomeObject]] internal slot on method definitions? JavaScript ProfessionalHard Try Now
What is Tail Call Optimization (TCO) and under what conditions does the ECMAScript specification mandate it? JavaScript ProfessionalHard Try Now
What is the output of this code? function test() { var x = 1; const inner = () => x; var x = 2; return inner; } console.log(test()()); JavaScript ProfessionalHard Try Now
What does the following code output? const arr = [1, 2, 3]; arr[Symbol.iterator] = function* () { yield ‘a’; yield ‘b’; }; console.log([…arr]); JavaScript ProfessionalHard Try Now
Which of the following correctly describes how async iteration (for await…of) works with an async generator? JavaScript ProfessionalHard Try Now