Javascript Exercises
Javascript Exercises
1. Declare a variable and initialize it. (Choose any variable name and keyword of your choice)
2. What will be the value of x when the code below is executed?
Let x = “hello”;
Calculate your 2 possible ages for that year based on the stored values.
For example, if you were born in 1988, then in 2026 you'll be either 37 or 38, depending on
what month it is in 2026.
Output them to the screen like so: "I will be either NN or NN in YYYY", substituting the
values.
Calculate the circumference based on the radius, and output "The circumference is NN".
Calculate the area based on the radius, and output "The area is NN".