A

Admin • 833K Points
Coach

Q. How do you write a conditional statement for executing code if 'x' is greater than 5?

  • (A) if x > 5
  • (B) if (x > 5)
  • (C) if x > 5 then
  • (D) if (x > 5) then
  • Correct Answer - Option(B)
  • Views: 21
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

JavaScript requires parentheses in if conditions.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.