Javascript Lec_I
Javascript Lec_I
2. Operators in JavaScript
Explanation:
Operators are used to perform operations on variables and values.
Arithmetic Operators: +, -, *, /, %, ** (power)
Comparison Operators: ==, ===, !=, !==, >, <, >=, <=
Logical Operators: &&, ||, !
Lab Practice Code:
let a = 10, b = 20;
4. Objects in JavaScript
Explanation:
Objects store data in key-value pairs. You can access properties using dot notation
or bracket notation.
Lab Practice Code:
let student = {
name: "Ali",
age: 21,
course: "IT"
};
console.log(student);