Semicolons are used in actions to separate discrete code expressions, i.e. discrete complete tasks. a desired outcome may use one such expression or several.
$Color = "blue'; $Badge = "ok";
General practice is to place each expression on a new line within an action, so semicolons are most often seen as line-ends in code.
$Color = "blue';
$Badge = "ok";
The last expression in an action of multiple expression doesn't require a semicolon end but no harm comes from doing so.
$Color = "blue'; $Badge = "ok";
Thus for the novice a good rule of them is to always end lines of code with a semicolon.
An exception is code lines ending with an opening curly bracket—see why.
Failure to use a semicolon where needed will result in a silent failure of all or part of the action.