Script elements at the top of the document are available sooner (so you can bind event handlers and have JS run as soon as an element becomes available), but they do block parsing of the rest of the page.
Script elements at the bottom aren't (so you can't) and there isn't any significant page left, so it doesn't matter if that is blocked.
Which is best depends on the relative importance priority (which has to be determined on a case-by-case basis) of having the JS running Vs. having the HTML rendering.
Note that a script element at the bottom must appear inside the body element. So it should be:
<script>...</script></body></html>
and not
</body><script>...</script></html>