Subjects

All subjects Django Java Python React Spring Boot JavaScript PHP
Sign Up Free
JavaScript 10 questions

JavaScript Basics & Fundamentals

Cover core JavaScript concepts including variables, operations, data types, type coercion, equality operators, and control flow.

More JavaScript
Interview questions 1–10 of 10
1

What are the differences between var, let, and const in JavaScript?

KeywordScopeHoistingRe-declarationRe-assignmentvarFunction-scopedHoisted, initialized as undefinedYesYesletBlo...

Read answer →
2

What is hoisting in JavaScript and how does it work?

Hoisting is JavaScript's behavior of moving declarations to the top of their scope before code execution.// Va...

Read answer →
3

Explain JavaScript data types. What is the difference between primitive and object types?

TypeCategoryExamplesMutable?String, Number, BooleanPrimitive'hello', 42, trueNoundefined, null, Symbol, BigInt...

Read answer →
4

What is scope and the scope chain in JavaScript?

Scope determines the accessibility of variables. JavaScript has global scope, function scope, and block scope...

Read answer →
5

What is type coercion in JavaScript? Explain == vs ===.

Type coercion is the automatic conversion of values from one type to another. The == operator performs coercio...

Read answer →
6

What are JavaScript falsy values and how are they evaluated in conditions?

Falsy values are values that evaluate to false in a boolean context. There are only 6 falsy values in JavaScri...

Read answer →
7

What is the difference between null and undefined in JavaScript?

AspectnullundefinedTypeObject (due to a bug)undefinedMeaningIntentional absence of a valueUnintentional absenc...

Read answer →
8

What is the this keyword in JavaScript and how does its value get determined?

The this keyword refers to the object that the function is called on. Its value is determined at call time, no...

Read answer →
9

What are template literals and what advantages do they offer over regular strings?

Template literals (backticks) allow string interpolation, multi-line strings, and expression evaluation - clea...

Read answer →
10

What is NaN and how do you check for it correctly?

NaN stands for 'Not-a-Number' but is of type 'number'. It's the only value in JavaScript that is not equal to...

Read answer →