Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between JavaScript, JScript & ECMAScript? [closed]

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:

  1. What is the different between JavaScript, ECMAScript and JScript?

  2. Which should I focus on learning?

  3. If these are versioned, which version should I be supporting?

  4. Are there any really good references (web / books etc) that are a must have/read?

  5. How do I ensure that what I write will be compliant with all major browsers (IE, FF, Safari, Chrome, Opera etc.) ?

  6. 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.

like image 690
Matthew Layton Avatar asked Aug 21 '12 08:08

Matthew Layton


People also ask

Is JScript and JavaScript the same thing?

A lot of people think that JScript and JavaScript are different but similar languages. That's not the case. They are just different names for the same language, and the reason the names are different was to get around trademark issues.

What is JScript script file?

JScript files are loaded with the scriptFile attribute of the VIEW element. They must be text files and should use the file name extension . js. If you have a JScript file that has the same name as the skin definition file, the JScript file will be loaded at the same time as the skin definition file.

Which one is better Python or JavaScript?

JavaScript is better for website development Hands down, JavaScript is undeniably better than Python for website development for one simple reason: JS runs in the browser while Python is a backend server-side language. While Python can be used in part to create a website, it can't be used alone.

What is difference between Java and JavaScript?

Key differences between Java and JavaScript: Java is an OOP programming language while Java Script is an OOP scripting language. Java creates applications that run in a virtual machine or browser while JavaScript code is run on a browser only. Java code needs to be compiled while JavaScript code are all in text.


2 Answers

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.

like image 187
Guffa Avatar answered Oct 21 '22 21:10

Guffa


  1. ECMAScript is the scripting language standardized by Ecma International in the ECMA-262 specification and ISO/IEC 16262. The language is widely used for client-side scripting on the web, in the form of several well-known dialects such as JavaScript, JScript, and ActionScript.

  2. Depends on you, but I think most commonly used for web dev is JavaScript

  3. JavaScript was formalized in the ECMAScript language standard and is primarily used in the form of client-side JavaScript

  4. I would recommend this book

  5. By learning more and more about the language itself and writing tests

  6. Look here

like image 4
pkurek Avatar answered Oct 21 '22 22:10

pkurek