, <, ==, &&, ||, % to evaluate conditions and return results. Exercise 1 finds the largest of two numbers. Exercise 2 checks the type of triangle based on side lengths. Exercise 3 checks if a number is within a given range. Exercise 4 performs arithmetic operations on two numbers. Exercise 5 checks if a year is a leap year. Exercise 6 finds the grade for a given mark. Functions are tested with sample inputs and expected outputs are provided.">, <, ==, &&, ||, % to evaluate conditions and return results. Exercise 1 finds the largest of two numbers. Exercise 2 checks the type of triangle based on side lengths. Exercise 3 checks if a number is within a given range. Exercise 4 performs arithmetic operations on two numbers. Exercise 5 checks if a year is a leap year. Exercise 6 finds the grade for a given mark. Functions are tested with sample inputs and expected outputs are provided.">
Javascript (Exercice If Else)
Javascript (Exercice If Else)
Function `findLargest()` finds the largest between two number by using “>”
and “=” operator in JavaScript.
Exercice 2
Check if a triangle is equilateral, scalene, or isosceles
Function `findTriangleType()` finds the type of the triangle for given side
values by using “==” and “&&” operator in JavaScript.
Exercice 3
Exercice 4
Exercice 5
}
checkLeapYear(2012) //"Year 2012 is a leap year"
Exercice 6
9. Find the grade for input marks
Function `findGrade()` to find the grade of the student based on the input
marks.