"Techcadd Computer Institute Now Train students in Best programming language course in jalandhar. So do not delay come and join" />
https://techcaddcomputerinstitute.com
2. What is JavaScript?
• Programming language
for web
• Runs in browsers and
servers (Node.js)
• Adds interactivity to
websites
3. History of JavaScript
• Created by Brendan Eich in 1995
• Originally called Mocha, then LiveScript
• Standardized as ECMAScript
4. JavaScript Features
• Python
• JavaScript
• Java
• C++
• Ruby
• Lightweight, interpreted
• Dynamically typed
• Object-oriented and functional
• Event-driven
5. How JavaScript Works
• Client-side scripting
• Embedded in HTML with <script> tag
• Executed by browser’s JavaScript engine
6. Primitive Data Types
These hold a single value and are immutable.
• Number
• Represents both integers and floating-point
numbers.
• Example: 42, 3.14
• String
• Sequence of characters enclosed in quotes.
• Example: "Hello", 'JavaScript'
• Boolean
• Logical entity that can be either true or false.
• Undefined
• A variable declared but not assigned a value.
• Example: let a; // a is undefined
• Null
• Represents no value or empty value explicitly.
• Example: let b = null;
• Symbol (ES6)
• Unique and immutable value used as an
identifier for object properties.
Data Types in JavaScript
Non-Primitive Data Type
• Object
• Collection of key-value pairs; can store multiple values and more complex
entities like arrays, functions, etc.