Interview Question

Features of JavaScript

JavaScript combines dynamic values, first-class functions, prototypes, and promises.

💡 Concept ✅ Quick Revision ⚡ JavaScript

Answer

JavaScript is a dynamic, garbage-collected programming language with first-class functions and prototype-based objects. • Values have types, while variables are not restricted to one type. • Functions can be stored, passed, and returned like other values. • Objects inherit through prototype chains, and asynchronous work commonly uses promises.

Example

Code
const double = value => value * 2;
console.log([1, 2, 3].map(double));
Output
[2, 4, 6]

Quick Revision

JavaScript combines dynamic values, first-class functions, prototypes, and promises.