Page 1
Wink Notes
B.Tech CSE — 5th Semester
Web Technology
— Unit - 2 —
1. Introduction to JavaScript
JavaScript (JS) is a high-level, interpreted programming language primarily used to add interactivity and logic to web pages. It is the only programming language native to web browsers.
1.1 Characteristics of JavaScript
- Dynamic Typing: Variables do not have fixed types. A variable holding a string can later hold a number.
- Interpreted (JIT): Modern browsers use Just-In-Time (JIT) compilers (like V8 in Chrome) to compile JS into machine code milliseconds before execution.
- Object-Oriented (Prototype-based): JS uses objects and inheritance, but it relies on Prototypes rather than classical Classes.
- Single-Threaded & Non-Blocking: JS runs on a single main thread, but uses an Event Loop to handle asynchronous operations (like network requests) without freezing the UI.