Why does function two not work? I don't understand why the first function works, but not the second.
window.addEventListener("load", () => {
one();
})
const one = () =>{
document.querySelector(".fun1").innerHTML = "function one";
}
window.addEventListener("load", two);
const two = () =>{
document.querySelector(".fun2").innerHTML = "function two";
}
<p class="fun1"></p>
<p class="fun2"></p>