A

Admin • 833K Points
Coach

Q. Consider the following statements
switch(expression)
{
statements
}
In the above switch syntax, the expression is compared with the case labels using which of the following operator(s) ?

  • (A) ==
  • (B) equals
  • (C) equal
  • (D) ===
  • Correct Answer - Option(D)
  • Views: 25
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

When a switch executes, it computes the value of expression and then looks for a case label whose expression evaluates to the same value (where sameness is determined by the === operator).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.