I tried the code snippet given by Google for the use of the spreadsheet API in JavaScript from here. It works but I don't understand the following part.
<script async defer src="https://apis.google.com/js/api.js"
onload="this.onload=function(){};handleClientLoad()"
onreadystatechange="if (this.readyState === 'complete') this.onload()">
</script>
In particular, why the code is written that way instead of as follows:
<script async defer src="https://apis.google.com/js/api.js"
onload="handleClientLoad()">
</script>