Semicolon instruction correct?


#1

The instructional text mentions:

Then write your block of reusable code between { }. Every line of code in this block must end with a ;

Is the must correct, cause I see a lot of other instructions and examples that say it's optional?


#2

Hello @stafmans,

It isn't necessary to have semicolons. However, it is generally good practice to have them because they signal to the code the end of a line of code.


#3

Clear! Thanks, the different explanations got me confused.


#4

The pleasure was all mine, @stafmans. If you feel my answer was satisfactory, then don't be afraid to put it as the solution to notify others that this topic is closed. Keep coding hard :laughing:!


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.