OK, so I'm trying to learn JavaScript properly so that I can write good, clean client-side code, but whenever I think I'm making progress, something stops me dead in my tracks!
I want to know:
What is the different between JavaScript, ECMAScript and JScript?
Which should I focus on learning?
If these are versioned, which version should I be supporting?
Are there any really good references (web / books etc) that are a must have/read?
How do I ensure that what I write will be compliant with all major browsers (IE, FF, Safari, Chrome, Opera etc.) ?
MOST IMPORTANTLY...Is there a reference of the core objects (Array, Number etc) so I know what is implemented already and what I need to do myself?
Thanks.
Javascript is the original name when the language was developed by Netscape.
JScript is Microsoft's name of their own implementation.
ECMAScript is the name of the language standard developed by ECMA, from the original Javascript implementation.
So, it's just one language, with different implementations.
The implementations of Javascript and JScript differ somewhat in what they support, but each version supports what's in the corresponding version of the ECMAScript standard. Generally you just use what's supported a few versions back, so that it works in all the browsers that are still in use.
One reference is the Mozilla Developer Network, as Mozilla is the current developer of Javascript. For each method and property you can find which version it is supported in.
JScript is documented at the Microsoft Developer Network, and has similar information about support. (Note that all Microsoft documentation is there, not only JScript, so for example you would need to search for "jscript array" rather than just "array".)
Using a library like jQuery is useful to avoid dealing with some of the compatibility problems between browsers.