javascript was meant to be a forgiving and permissive language due to the fact that it is a browser language and so it was designed to try and make sense out of bad programming. this permissiveness also makes it somewhat quirky, which is ok considering what it is used for