MDN definition on semi-colons:
So at this point you might be asking “what the heck are instructions or statements”? I’d say go read over the docs or just don’t worry about the definitions, and focus on the syntax. Simply because if you memorize the rules/syntax you’ll understand the definition more than if you learn the definition and try to learn the rules/syntax from it.
Generally, as said above you don’t actually need
; for JS to work, this is due to most environments running your code assuming what your doing, however there are always edge cases so I’d be careful about knowing about them, or knowing where
Long story short, explicit placement of
; goes where it needs to go for your code to work. Its hard to pin down a “rule of thumb” the same way its hard to pin down what “the right code is”, because there are infinite possibilities to do something, and infinite possibilities to do it wrong ;D
Good luck, keep learning, keep buildings