Question: Declare a variable called num and assign it a numeric value. Use a conditional statement ( if / else ) to check if the value

Declare a variable called "num" and assign it a numeric value.
Use a conditional statement (if/else) to check if the value of "num" is greater than 10. If it is, print "The value of num is greater than 10" to the console. If it is not, print "The value of num is less than or equal to 10" to the console.
Use a conditional statement (switch) to check the value of "num". If the value is 1, print "The value of num is 1". If the value is 2, print "The value of num is 2". If the value is 3, print "The value of num is 3". If the value is not 1,2, or 3, print "The value of num is not 1,2, or 3" to the console.
Save the HTML file and open it in a web browser. Open the developer console and verify that the output of the conditional statements is correct.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!