-2

I want to learn JavaScript and I intend to use it for work not as a hobby, I want to create useful things and I want them to work on everything (computers, smartphones, etc) but I'm very confused so please I ask you for your help.

Yesterday I bought a book (Learning JavaScript, third edition by Ethan Brown) and I was enjoying the book and everything was great until I reach a part titled "Writing ES6 Today" which basically said, this is the new thing but nobody is using it and it's not supported everywhere, so at that point I stop reading it.

Because I don't have more money I looked for something free and found You Don't Know JS, so I started reading it and at some point it said that it will assume ES6, but the other guy said that the web is not ready for this so should I learn it or no.

So I decided to inform myself and then it's when things got really confusing.

So the general opinion in the places that I looked was that you should learn ES5 and then learn ES6, but things got more interesting when someone said that you should learn plain JavaScript and then ECMAScript, but wait aren't ES5 and ES6 versions of JavaScript?

So I ask:

  • Are JavaScript and ECMAScript mutually exclusive?
  • Should I stick with my book or get another?
  • is JavaScript: The Definitive Guide, 6th Edition a good book or is it too old?
Laxus
  • 73
  • 1
  • 1
  • 5
  • http://stackoverflow.com/tags/javascript/info – trenthaynes May 25 '16 at 18:34
  • 3
    Welcome to Stack Overflow, and congrats on working on learning JavaScript! Unfortunately, this question is likely too broad and off-topic for Stack Overflow. Stack Overflow is more for help with specific issues. I recommend you check out the [Help Center](http://stackoverflow.com/help) when you get a chance. To give you some guidance relating to your question: [What is the difference between ECMAScript and JavaScript?](http://stackoverflow.com/questions/912479/what-is-the-difference-between-javascript-and-ecmascript) – Brandon Anzaldi May 25 '16 at 18:35
  • Also, it looks like your book is a little old to have include ES6, but use what works for you. It looks like the book's still a great one, but you'll have to do a little legwork to acquaint yourself with the latest language features. – Brandon Anzaldi May 25 '16 at 18:36
  • @Laxus, [I recommend that you read the JavaScript tag wiki if you're interested in learning more about the language](http://stackoverflow.com/tags/javascript/info). – zzzzBov May 25 '16 at 20:12

2 Answers2

4

Are JavaScript and ECMAScript mutually exclusive?

EcmaScript is the official language standard. I believe it is not called "Javascript" because of trademark concerns at the time the standard was initially formed.

Javascript is what people who implement that standard tend to call their implementations. EcmaScript and Javascript are meant to refer to the same language though individual implementations may have their own variations from the standard.

So the general opinion in the places that I looked was that you should learn ES5 and then learn ES6, but things got more interesting when someone said that you should learn plain JavaScript and then ECMAScript, but wait aren't ES5 and ES6 versions of JavaScript?

ES5 and ES6 are versions of the EcmaScript standard.

Which to use/learn really depends upon your programming environment. If you were writing a server-side Javascript app in node.js, you could get node v6 and have many ES6 features immediately available to you.

If you are writing Javascript that will run in a web page and you need to support a wide range of browsers including things like IE9, then you need to code to ES5 or use polyfills or transpilers to guarantee your code will run in the target browsers.

If you are writing a browser add-on for a specific version of a specific browser, you can assess what the Javascript capabilities are in that specific browser and code to that.

This ES6 reference gives you an idea what ES6 features are supported in what Javascript engine.

Should I stick with my book or get another?

is JavaScript: The Definitive Guide, 6th Edition a good book or is it too old?

These types of question are considered off-topic here on stack overflow because they are pretty much entirely opinion.

Community
  • 1
  • 1
jfriend00
  • 683,504
  • 96
  • 985
  • 979
  • @Laxus - Did this answer your question? If so, please click the green checkmark to the left of the answer to indicate that to the community and to earn yourself some reputation points for following the proper procedure here on stack overflow. – jfriend00 May 29 '16 at 17:43
0

Ecmascript is the blue print/standard on what JavaScript should be and how to build it. If you want to make your own version/implementation of JavaScript, then you would take a look at Ecmascript's documentation, but of course you don't have to follow all the suggestions.