All Templates

JavaScript Interview Questions

30 essential JavaScript questions covering closures, promises, prototypes, and ES6+ features. Perfect for screening frontend developers.

MEDIUM7 questions12 minProgramming

Question Preview

1.What is the output of typeof null in JavaScript?
null
object
undefined
string
EASYMultiple Choice
2.What is a closure in JavaScript?
A function that retains access to its outer scope even after the outer function has returned
A function that is immediately invoked after definition
A method that closes browser windows via script
A way to make variables private using the private keyword
MEDIUMMultiple Choice
3.What is the difference between let, const, and var?
var is function-scoped; let and const are block-scoped; const prevents reassignment
They are identical but introduced in different ES versions
let allows reassignment while var does not
const makes the value immutable including nested properties
EASYMultiple Choice

+ 4 more questions included in the full template