Semicolon instruction correct?


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?


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.


Clear! Thanks, the different explanations got me confused.


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:!


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