104k views
0 votes
In JavaScript, an if statement needs to end with what symbol?

A.
:

B.
[

C.
{

D.
;

User Lunicon
by
8.4k points

2 Answers

2 votes
the answer is C .) “ { ”



User Martin Tausch
by
7.7k points
5 votes

Answer:

C. "{"

Step-by-step explanation:

In JavaScript, a statement does not need to end with any specific symbol like ":" or "[". However, it does require the use of curly braces -> "{ }" to enclose the block of code if that code would be executed if the condition of the if statement is true. Therefore, the correct answer is "C" or "{"

User Giszmo
by
8.7k points

No related questions found