@ekaitz_zarraga My guess is inherintance from what was JS before becoming what it is as of today. It was just a glue language for Java applets and to add some "flair" to webpages back then.
Some ill-tongued voices say that it was a language for designers and that's why... xD