0% found this document useful (0 votes)
8 views4 pages

JavaScript Session 14 Notes

JavaScript is a lightweight scripting language for creating dynamic web content, initially developed by Brendan Eich in 1995 and standardized as ECMAScript in 1997. It has evolved through various versions, with significant updates in ES6 and later, introducing features like block scope and async/await. The document also covers syntax, variable declaration, data types, operators, and control flow in JavaScript.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

JavaScript Session 14 Notes

JavaScript is a lightweight scripting language for creating dynamic web content, initially developed by Brendan Eich in 1995 and standardized as ECMAScript in 1997. It has evolved through various versions, with significant updates in ES6 and later, introducing features like block scope and async/await. The document also covers syntax, variable declaration, data types, operators, and control flow in JavaScript.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

JavaScript Session 14 Notes

🔶 What is JavaScript?

- JavaScript is a lightweight, interpreted scripting language used to create dynamic and


interactive content on web pages.

- It runs in the browser (client-side) but can also be used on the server-side using
environments like Node.js.

📜 JavaScript History

- Developed by Brendan Eich in 1995 at Netscape.

- Originally named Mocha, then LiveScript, and finally JavaScript.

- Standardized by ECMA International as ECMAScript (ES) in 1997.

🔁 JavaScript & ECMAScript

- JavaScript is the programming language.

- ECMAScript is the standard specification JavaScript follows.

- Different browsers implement ECMAScript, with each JavaScript engine (like V8 in


Chrome) supporting specific versions.

📅 JavaScript Versions

- ES1 to ES5 (1997–2009): Basic features like functions, arrays, objects.

- ES6 (2015): Major update – let, const, arrow functions, classes, promises.

- ES7 to ES14 (2016–2023): Added async/await, optional chaining, nullish coalescing, etc.

🔤 Syntax Review

- Case-sensitive

- Statements end with a semicolon (;)

- Blocks are grouped with curly braces {}


Example:

let name = "Bhavyasree";

console.log(name);

🔑 Keywords & Reserved Words

- Keywords: var, let, const, if, else, while, for, function, etc.

- Reserved words (can't be used as identifiers): class, enum, super, implements, interface,
etc.

📦 Variable Declaration

- var: Old, function-scoped

- let: Block-scoped, ES6+

- const: Block-scoped, constant values

🌐 Variable Scope

- Global Scope: Declared outside any function or block.

- Function Scope: Declared inside a function (with var).

- Block Scope: Declared inside {} using let or const.

📍 Block Scope

- Introduced with let and const in ES6.

- Variables declared in {} can't be accessed outside the block.

🔢 Primitive Values

- Stored by value

- Types: string, number, boolean, null, undefined, symbol, bigint


📚 Reference Values

- Stored by reference

- Objects, arrays, functions

🔣 Types

- Primitive: string, number, boolean, null, undefined, symbol, bigint

- Reference: object, array, function

🔁 Type Conversion

- Implicit: JS automatically converts (e.g., "5" + 2 becomes "52")

- Explicit: Using functions like Number(), String()

🧮 Expressions in JavaScript

- Arithmetic: +, -, *, /, %, **

- Relational: >, <, >=, <=

- Logical: &&, ||, !

- Assignment: =, +=, -=, etc.

- Others: ternary ? :, typeof, instanceof

➕ Operators Overview

Arithmetic: +, -, *, /, %, **

Relational: <, >, <=, >=, ==, !=

Logical: &&, ||, !

Assignment: =, +=, -=, *=, /=, %=

Bitwise: &, |, ^, ~, <<, >>


🔁 Flow Control and Conditionals

- if, else if, else

- switch-case

🔄 Loops & Iteration

- for loop

- while loop

- do...while loop

- for...of (arrays), for...in (objects)

⛔ Jump Statements

- break: Exit from loop or switch.

- continue: Skip to next iteration.

- return: Exit from function.

- throw: Throws an error.

You might also like