What is the result?
let arr = ["a", "b", "c"];
arr.reverse();
console.log(arr);Read the full question →JavaScript runs in every browser and, through Node, on most back ends too. It is the language with the widest reach and the most edge cases.
Interviewers lean on coercion rules, the prototype chain, closures over loop variables, and the exact order the microtask queue drains. Most JavaScript screens are really output-prediction screens.
Where it shows up: Frontend roles at almost every company, plus full-stack and Node back-end roles. It is the most common first round in web hiring.
Twenty real JavaScript questions from the library, code snippet included. Nothing here is paraphrased for search engines. It is the same text a signed-in user sees.
let arr = ["a", "b", "c"];
arr.reverse();
console.log(arr);Read the full question →let arr = ["a", "b"];
arr.push("c");
console.log(arr);Read the full question →typeof null === "object"Read the full question →let arr = [[1, 2], [3, 4, 5]];
console.log(arr.flat());Read the full question →const obj = {
name: "Hello",
sayHello: function() {
console.log(this.name);
}
};
obj.sayHello();Read the full question →let str = "Hello World";
console.log(str.toUpperCase());Read the full question →let numbers = [1, 2, 3, 4];
let result = numbers.find(n => n > 1);
console.log(result);Read the full question →let fruits = ["apple", "banana", "orange"];
console.log(fruits.indexOf("banana"));Read the full question →let add = (x, y) => x + y;
console.log(add(5, 10));Read the full question →let numbers = [1, 2, 3, 4];
let sum = numbers.reduce((acc, val) => acc + val);
console.log(sum);Read the full question →let arr = [[1, 2], [3, 4, 5]];
console.log(arr.flatMap(x => x));Read the full question →let arr = [1, 2, 3];
let result = arr.map(x => x + 1);
console.log(result);Read the full question →undefined * 2Read the full question →let str = "world";
console.log(str.endsWith("ld"));Read the full question →let arr = [1, 2, 3];
let reversed = arr.slice().reverse();
console.log(reversed);Read the full question →typeof function() {}Read the full question →parseInt("5px")Read the full question →let arr = [1, 2, 3, 4];
console.log(arr.some(x => x > 2));Read the full question →let arr1 = ["a", "b"];
let arr2 = ["c", "d"];
let result = arr1.concat(arr2);
console.log(result);Read the full question →for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 100);
}Read the full question →We keep the correct answer, the explanation and the scoring behind sign-in so the platform stays honest, which is why the answer options and the worked explanation for every JavaScript question stay behind a free account. Signing in is free and takes a few seconds.
42 distinct JavaScript topics are tagged across the library. These are the real topic labels stored on the questions, not a hand-written list.
…