Does a browser process these two snippets the same way?:
<script type="javascript">
myFunction1();
myFunction2();
</script>
Vs.
<script type="javascript">
myFunction1();
</script>
<script type="javascript">
myFunction2();
</script>
They will be absolutely equivalent. There are no scope differences, no execution differences, nothing.
The only difference is that there will be two instead of one script element in the parsed DOM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With