InterviewHubPRO
Section Overview
Q335

Question 335 of 521

Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

64%
JavaScript Internals (521 Qs)•Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

What paradigm is Javascript

JavaScript is a multi-paradigm language, supporting imperative/procedural programming, Object-Oriented Programming and functional programming. JavaScript supports Object-Oriented Programming with prototypical inheritance.

Practical Code Example

javascript
// JavaScript is a Multi-Paradigm Language:
// 1. Prototype-based Object-Oriented Programming (OOP)
class User { constructor(name) { this.name = name; } }

// 2. Functional Programming (First-class functions, pure functions, immutability)
const double = x => x * 2;
[1, 2, 3].map(double);

// 3. Event-Driven Asynchronous Programming
setTimeout(() => console.log('Event driven'), 100);