There is something wrong with those characters. Retyping load
and alert
fixes the issue for me. So I’m guessing there might be some hidden ASCII characters somewhere in them. (Quentin explains the reason in his answer: https://stackoverflow.com/a/51170307/5894241)
Here’s the updated snippet:
function lоаd() {
аlert('Hello!');
}
window.onload = load;
Here’s your current snippet for reference:
function lоаd() {
alert('Hello!');
}
window.onload = lоаd;
solved What is wrong with this function