Programming and AI
Your guide to
JavaScript
للحـصول علي فيديو الشرح
Scan QR code
Chapter 1
Chapter 2
Calculations and Strings
Chapter 3
Variables
Chapter 5
If statement
Case1: Test 1 condition
Solution
Chapter 6
if-else statement
Case2
Solution
Chapter 7
else if statements
Case3: Test multiple conditions
Solution
Chapter 9
Logical operator
Symbol Name meaning Example
&& AND Both conditions should be true if (age > 18 && score >= 50){ }
|| OR Only one condition should be true if (age >= 18 || age < 18 ){ }
&: ampersand |: Vertical bar
Chapter 10
Iterative operation
For statement (Loops)
for (start; condition; update){ }
NOTES: 1- count = count + 1 can be written as count++
2- in the programming world, in for statement ( ) , the variable is often named i
NOTE: 1- Break a line after the left curly bracket “ { ” and before the right curly bracket “}”.
2- Use indentation (space at line start) to make code easier to read