But what if you do this:
<script src='3rdpartyA.js'></script>
<script src='yourscript.js'></script>
<script src='3rdpartyB.js'></script>
You need the semicolon at both ends to insulate your script from the unknown coding style or 3rd party scripts which may be appended or prepended to yours.If 3rd party A omits a trailing semicolon, or 3rd party B doesn't uses your semicolon prefix style then by wrapping your script in semicolons you pre-emptively prevent problems.
I believe this is an example of the wider coding style called "defensive coding".