2. Write a JavaScript conditional statement to find the sign of product of three numbers. Display an alert box with the specified sign. Go to the editorSample numbers : 3, -7, 2
Output : The sign is -
Click me to see the solution

5. Write a JavaScript for loop that will iterate from 0 to 15. For each iteration, it will check if the current number is odd or even, and display a message to the screen. Go to the editorSample Output :"0 is even"
"1 is odd"
"2 is even"
----------
----------
Click me to see the solution

6. Write a JavaScript program which compute, the average marks of the following students Then, this average is used to determine the corresponding grade. Go to the editor

7. Write a JavaScript program which iterates the integers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples
of both three and five print "FizzBuzz". Go to the editorClick me to see the solution

8. According to Wikipedia a happy number is defined by the following process :
"Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1. Those numbers
for which this process ends in 1 are happy numbers, while those that do not end in 1 are unhappy numbers (or sad numbers)".
Write a JavaScript program to find and print the first 5 happy numbers. Go to the editorClick me to see the solution

9. Write a JavaScript program to find the armstrong numbers of 3 digits. Go to the editorNote : An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example, 371 is an Armstrong number since 3**3 + 7**3 + 1**3 = 371.
Click me to see the solution

10. Write a JavaScript program to construct the following pattern, using a nested for loop. Go to the editor