Hey everyone, I've been trying to figure out how to add multiple window.onload events to my web page, but I'm having trouble getting it to work. Here's the code I'm working with:

<script>
window.onload = function() {
// Code for the first onload event
};

window.onload = function() {
// Code for the second onload event
};
</script>

The problem is that only the second window.onload event seems to work. Can someone help me understand why this is happening and how I can add multiple window.onload events?