Multiple choice technology web technology

6.How do you write a conditional statement for executing some statements only if "i" is equal to 5?

  1. if (i==5)

  2. if i=5

  3. if i=5 then

  4. if i==5 then

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In many programming languages like C, C++, Java, and JavaScript, the double equals sign (==) is the comparison operator used to check for equality. The single equals sign (=) is typically an assignment operator. The 'then' keyword is used in languages like VB or Pascal.