0% found this document useful (0 votes)
7 views3 pages

Javascript Full Notes

This document provides comprehensive notes on JavaScript, covering its definition, variables, data types, operators, conditions, loops, functions, and more. It includes examples and important points about JavaScript's functionality in web browsers. Additionally, practice questions are provided for further learning and application of the concepts discussed.

Uploaded by

singhr61685
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Javascript Full Notes

This document provides comprehensive notes on JavaScript, covering its definition, variables, data types, operators, conditions, loops, functions, and more. It includes examples and important points about JavaScript's functionality in web browsers. Additionally, practice questions are provided for further learning and application of the concepts discussed.

Uploaded by

singhr61685
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JavaScript Full Notes (Easy Hindi + Interview +

Practice)

1. JavaScript Kya Hai?


JavaScript ek programming language hai jo web pages ko dynamic banati hai. Iska use browser me
hota hai jaise Chrome, Edge, etc.

2. Variables
Variables data store karne ke liye use hote hain.

• var (old method)

• let (recommended)

• const (constant value)

let name = "Rahul";


const pi = 3.14;

3. Data Types
• Number → 10

• String → "Hello"

• Boolean → true / false

• Array → [1,2,3]

• Object → {name: "Rahul"}

4. Operators
Arithmetic operators: + - * / %
let a = 10;
let b = 5;
[Link](a + b); // 15

5. Conditions (if-else)
let age = 18;

if(age >= 18){


[Link]("Adult");
}else{
[Link]("Minor");
}

6. Loops
for loop:
for(let i=1; i<=5; i++){
[Link](i);
}

while loop:
let i = 1;
while(i <= 5){
[Link](i);
i++;
}

7. Functions
function add(a, b){
return a + b;
}
[Link](add(2,3));

8. Arrow Function
const add = (a,b) => a + b;

9. Arrays
let arr = [10,20,30];
[Link](arr[0]);

10. Objects
let student = {
name: "Rahul",
age: 21
};
[Link]([Link]);

11. DOM (Document Object Model)


[Link]("demo").innerHTML = "Hello";

12. Events
function show(){
alert("Button clicked");
}

13. Next Line


[Link]("Hello\nWorld");

14. Important Points


• JavaScript case-sensitive hai

• Browser me run hoti hai

• HTML ke saath use hoti hai

15. Practice Questions


• Even/Odd program likho
• Palindrome program likho

• Factorial find karo

• Array sum find karo

• Object create karke data print karo

You might also like