JavaScript ES6+ Features You'll Be Tested On in Any Interview
Modern JavaScript interviews expect you to know ES6+ cold. Here are the features that come up most, with examples of exactly how they're tested.
If you're preparing for a JavaScript technical interview, knowing ES6+ is not optional — it's expected. Interviewers assume modern JS fluency and write questions that expose gaps fast.
Here are the features that come up most, with the exact kinds of questions you'll face.
1. let, const, and the temporal dead zone
Most people know let is block-scoped and const can't be reassigned. What catches people is the temporal dead zone.
console.log(x); // undefined (var is hoisted) var x = 5; console.log(y); // ReferenceError (temporal dead zone) let y = 5;
let and const are hoisted but not initialised. Accessing them before declaration throws a ReferenceError.
2. Arrow functions and how they handle this
Arrow functions don't have their own this. They inherit it from the enclosing scope. This is tested heavily.
const obj = {
name: 'Examifyr',
regular: function() { return this.name; }, // 'Examifyr'
arrow: () => this.name, // undefined
};What to know: Never use arrow functions as object methods when you need this to refer to the object. Arrow functions are ideal for callbacks inside methods.
3. Destructuring and the rest operator
Destructuring is everywhere in modern JS — and interviewers test the edge cases.
// Array destructuring with skip
const [first, , third] = [1, 2, 3];
console.log(third); // 3
// Object rest
const { a, ...rest } = { a: 1, b: 2, c: 3 };
console.log(rest); // { b: 2, c: 3 }
// Default values
const { name = 'Guest' } = {};
console.log(name); // 'Guest'4. Promises and async/await
Async code is the most tested area in senior JS interviews. You need to understand both Promises and async/await, and crucially, how errors propagate.
// Promise chain
fetch('/api/data')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
// async/await equivalent
async function getData() {
try {
const res = await fetch('/api/data');
const data = await res.json();
console.log(data);
} catch (err) {
console.error(err);
}
}What to know: await only works inside async functions. A rejected Promise that isn't caught will throw an unhandled rejection error.
5. Closures — the classic interview question
Closures come up in almost every JavaScript interview. The classic trap:
// Using var — all log 3
for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 100);
}
// Using let — logs 0, 1, 2
for (let i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 100);
}var is function-scoped so all callbacks share the same i. let creates a new binding per iteration.
Test yourself before the interview does
Reading code examples isn't the same as being tested under pressure. The Examifyr JavaScript quiz gives you 25 real exam-style questions and shows you exactly which ES6+ concepts you haven't fully internalised.
Think you're ready? Prove it.
Take the free JavaScript readiness test. Get a score from 0–100, a topic breakdown, and your exact weak areas — in under 20 minutes.
Take the free JavaScript test →Free · No sign-up · Instant results
More from Examifyr
← All articles