What is the difference between Object.entries() and Object.fromEntries()? JavaScript DeveloperMedium Try Now
What does the following code output? const arr = [1, [2, [3]]]; console.log(arr.flat(1)); 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
Which of the following best describes how JavaScript handles the ‘this’ keyword inside a regular method called without explicit context? 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 difference between shallow copy and deep copy of an object? JavaScript DeveloperMedium Try Now
Which approach correctly creates a deep copy of a plain JSON-serializable object in modern JavaScript? JavaScript DeveloperMedium Try Now
What is the output of the following? const {a: x, b: y = 10} = {a: 1}; console.log(x, y); 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 does the following snippet demonstrate? const memoize = fn => { const cache = new Map(); return (…args) => { const key = JSON.stringify(args); if (cache.has(key)) return cache.get(key); const result = fn(…args); cache.set(key, result); return result; }; }; JavaScript DeveloperMedium Try Now