I am writing a program to find sequence of execution of document.ready, window.onload, body.onload, but due to some reason my body.onload is not giving out console.log. Why?
$(document).ready(function(){
console.log('document is ready now ...');
});
window.onload = () => {
console.log('window is loaded...');
}
function bodyOnload() {
console.log('body is loaded...');
}
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
</head>
<body onload="bodyOnload()">
<h1>Hello ...</h1>
</body>
</html>

