// The same, but using the onload event handler property: window.onload = (event) => { console.log('page is fully loaded'); };