[Link].
dev
Condition Practice Task
1. Write a JavaScript program that displays the largest integer among
two integers.
2. Write a JavaScript conditional statement to find the largest of five
numbers. Display an alert box to show the results.
Sample numbers : -5, -2, -6, 0, -1
3. Write a JavaScript program that computes the average marks of the
following students. Then, this average is used to determine the
corresponding grade.
Student name Marks
Dinesh 80
Vinod 77
Divya 88
Isha 95
Tax 68
The grades are computed as follows :
Range Grade
<60 F
<70 D
<80 C
<90 B
<100 A
4. Write a JavaScript program to compute the greatest common
divisor (GCD) of two positive integers.
5. Write a JavaScript program to sum 3 and 5 multiples under 1000.
6. Check if a number is odd or even in JavaScript.
Note:- Get value from client/user
7. Perform arithmetic operations on two numbers.
Operations: + - * / %
8. Give a number between 0 and 6. Write a program to print day of
week name using switch case
number: 0 => day of week name: Sunday
number: 1 => day of week name: Monday
number: 2 => day of week name: Tuesday
number: 3 => day of week name: Wednesday
number: 4 => day of week name: Thursday
number: 5 => day of week name: Friday
number: 6 => day of week name: Saturday
9. Write a program that takes a year from the user and check whether
that year is a leap year or not.
10. Using the JavaScript switch statement to get the day count based
of a month
Thank You1
1
Trunal Dudhatra
+91 951 079 5391