Javascript exercise
1.Write a function calculate(a, b, operator) that performs addition, subtraction,
multiplication, or division based on the operator provided.
2.Write a function isEven(number) that returns "Even" if the number is even and "Odd" if
the number is odd.
3.Create a student object with properties: name, age, grade. Then print a sentence using
those values.
4.Write a function that takes two numbers and returns the greater one, or a message if they're
equal.
5.Write a function checkType(value) that returns the type of the input using typeof.
6.Write a function that calculates the area of a circle given the radius. Use π = 3.14.
7.Create a function createProfile(name, age) that returns an object with name, age, and
a greeting method that says "Hello, my name is X".
8.Given two variables a and b, write a function to swap their values.
9.Write a function checkGrade(score) that returns:
● "A" if score ≥ 90
● "B" if 80–89
● "C" if 70–79
● "D" if 60–69
● "F" if below 60