JavaScript is probably the most underestimated programming language ever. I am not going into technical details here, but here are the keywords: prototypes, first-class functions. It is a language designed to be embedded in an application; and web browsers are just one of the possibilities—ActionScript in Flash programming is almost the same language; you can use JavaScript in your own applications; you can develop websites in JavaScript.
What people perceive as “JavaScript sucks” almost always means “web browsers suck”. If you would write web browser scripts in Java or C++, you would get into exactly the same kind of problems if each browser (and each version of the browser) would provide you different objects, with different method and variable names, or even with the same methods and variables which would do different things. (Actually, this is how Microsoft tried to destroy Java once, by providing a widely used but slightly different version, to make Java programs behave differently in different environments.)
JavaScript is probably the most underestimated programming language ever. I am not going into technical details here, but here are the keywords: prototypes, first-class functions. It is a language designed to be embedded in an application; and web browsers are just one of the possibilities—ActionScript in Flash programming is almost the same language; you can use JavaScript in your own applications; you can develop websites in JavaScript.
What people perceive as “JavaScript sucks” almost always means “web browsers suck”. If you would write web browser scripts in Java or C++, you would get into exactly the same kind of problems if each browser (and each version of the browser) would provide you different objects, with different method and variable names, or even with the same methods and variables which would do different things. (Actually, this is how Microsoft tried to destroy Java once, by providing a widely used but slightly different version, to make Java programs behave differently in different environments.)