What is wrong with this function

When you wrote:

function lоаd(){ аlert('Hello!'); } 

You used:

U+006C : LATIN SMALL LETTER L
U+043E : CYRILLIC SMALL LETTER O
U+0430 : CYRILLIC SMALL LETTER A
U+0064 : LATIN SMALL LETTER D

When you wrote:

window.onload = load;

You used:

U+006C : LATIN SMALL LETTER L
U+006F : LATIN SMALL LETTER O
U+0061 : LATIN SMALL LETTER A
U+0064 : LATIN SMALL LETTER D

You have to use the same name. You can’t expect different names using different characters which happen to look similar to mean the same thing.

Leave a Comment