JavaScript Operators Coding Practice
Beginner Level:
1. Add two numbers and print result (let a = 5, b = 3)
2. Subtract two numbers
3. Multiply two numbers
4. Divide two numbers
5. Find remainder using % operator
Comparison Practice:
6. Check if two numbers are equal
7. Check if a number is greater than another
8. Check if a number is less than or equal to another
9. Compare "5" and 5 using == and ===
10. Check if two variables are NOT equal
Logical Practice:
11. Check if a number is between 10 and 50 (let x = 25)
12. Check if a number is less than 10 OR greater than 100
13. Reverse a boolean using !
14. Check if both conditions are true
15. Check if at least one condition is true
Increment / Decrement:
16. Use x++ and print before & after value
17. Use ++x and compare result
18. Decrement a number using --
Mixed Practice:
19. Use ternary operator to check even or odd (let n = 7)
20. Swap two numbers without using third variable (let a = 5, b = 10)
Challenge:
[Link](10 + "5");
[Link]("10" - 5);
[Link](true + true);
[Link](false + 1);