In the following example, we have a conditional statement that has to evaluate true but has no effect on the program.
var x =1;
x ====1; //Evaluates to be “true”.
var x = 5;
var y = 3 * 7;
var z = “cake” .length * 9;
The values on the right-hand side of the assignment operator are called expression. The expressions can not stand alone. The warning message can occur that you have forgotten the variables that would normally assign that the expressions value tp.
A function call is something like console.log(“HI”). This function call also called an expression.
In some cases semicolons can also be omitted. But it is suggested to put them wherever the yellow warning sign says that a semicolon is missing. You can remove them later when you understand exactly under which conditions these semicolons can be omitted. If the removal of semicolon does not produce a warning, then it means that the semicolon does not belong at that place.
Semicolons in the wrong places can create bugs that are hard to find.