JavaScript Assignment
JavaScript Assignment
Write a JavaScript program that accepts two numbers in two prompts and
displays the larger one in the console.
Sample: 3
Output : The sign is +
Sample: -5
Output : The sign is -
3. Write a JavaScript program that accepts five numbers in five prompts and
displays the larger one in the console.
4. 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.
Sample Output :
"0 is even"
"1 is odd"
"2 is even"
----------
----------
<60 F
<70 D
<80 C
<90 B
<100 A
6. 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".
*
**
***
****
*****