0% found this document useful (0 votes)
5 views1 page

Js Operators Practice

The document outlines a series of JavaScript coding exercises focused on operators, including basic arithmetic, comparison, logical operations, and increment/decrement practices. It also includes mixed practice tasks and a challenge section that demonstrates type coercion in JavaScript. The exercises are designed for beginners to enhance their understanding of JavaScript operators and their functionalities.

Uploaded by

rajshish38
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)
5 views1 page

Js Operators Practice

The document outlines a series of JavaScript coding exercises focused on operators, including basic arithmetic, comparison, logical operations, and increment/decrement practices. It also includes mixed practice tasks and a challenge section that demonstrates type coercion in JavaScript. The exercises are designed for beginners to enhance their understanding of JavaScript operators and their functionalities.

Uploaded by

rajshish38
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 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);

You might also like