0% found this document useful (0 votes)
3 views

JavaScript Notes (1)

The document covers JavaScript fundamentals, focusing on variables and data types, emphasizing the use of 'let' and 'const' over 'var' due to hoisting issues. It provides examples of variable declaration and conditional statements for decision-making. The key takeaway is to prefer 'let' and 'const' for variable declarations and to use conditional statements for logical decisions.

Uploaded by

sumitmuke22
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)
3 views

JavaScript Notes (1)

The document covers JavaScript fundamentals, focusing on variables and data types, emphasizing the use of 'let' and 'const' over 'var' due to hoisting issues. It provides examples of variable declaration and conditional statements for decision-making. The key takeaway is to prefer 'let' and 'const' for variable declarations and to use conditional statements for logical decisions.

Uploaded by

sumitmuke22
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/ 2

JavaScript Fundamentals - Notes

Lesson: Variables & Data Types

📌 JavaScript me variables data store karne ke liye use hote hain.


✔ let – Jab value change ho sakti hai.
✔ const – Jab value fix hai.
❌ var – Avoid karna chahiye (Hoisting issues).

✅ Example:

let name = "Kevin";


const age = 25;
console.log(name, age); // Output: Kevin 25

👆 Yahaan 'name' ek let variable hai jo change ho sakta hai,


aur 'age' ek const variable hai jo fix hai.

🎯 Always prefer 'let' and 'const' over 'var'.

Lesson: Conditional Statements

📌 Conditional statements decisions lene ke liye use hote hain.

✅ Example:

let age = 18;

if (age >= 18) {


console.log("You can vote!");
} else {
console.log("You cannot vote!");
}
👆 Yahaan agar 'age' 18 ya usse zyada hai, toh "You can vote!" print hoga,
warna "You cannot vote!" print hoga.

You might also like