I'm thinking of starting Javascript as a hobby.
I have only a little programming experience with C and Python.
I wish I could make a simple add-on for the browser.

There seems to be an ECMAScript standard for Javascript. Which version is better for studying? I would like to refer to it when choosing a textbook.

As far as I investigated, there was an opinion that "There are many changes in ES6 (2015), so it is better to respond to it".
The purchased textbook "Thorough Master Javascript textbook" at hand was written based on ES5 and explained in detail the new features of ES6.
Is this book all right to study now? Or is it better to use another textbook because the information is already old?

(If i try to select the latest version of the textbook, there will be few absolute numbers, and the above textbook seemed interesting (it also contains topics on mathematics) so I changed it now Is too heavy ...)

I would be happy if someone wrote my opinion.

  • Answer # 1


    In short, "learn if necessary, not learn if unnecessary"
    Only this.
    The guideline for the need iscan you make it?

    If what you're trying to make can be made in the ES5 category, you don't have to learn the latest specifications.
    However, regardless of necessity, the latest specification SHOULD be learned for the purpose of expanding one's own knowledge.

    RFC 2119-Key words for use in RFCs to Indicate Requirement Levels

    But it can be judged by takenoko_sand who is actually trying to make it.
    Try to make with your own knowledge (ES5) and judge by the result.
    That is the attitude of "learning when needed" that many programmers in the world do without being conscious of it.

    Exploring ES2018 and ES2019

    By the way, is the latest ES bookExploring ES2018 and ES2019?

    Summary of books by level of JavaScript

    Exploring JS: JavaScript books for programmers

    Exploring ES2018 and ES2019

    If you want tolearn systematicallythe latest specs, books are good.
    I can't review it because I don't have it, but if you go through "Dr. Axel Rauschmayer", you can see the author.

    Backward compatibility

    Since Python is a server-side language, when upgrading from Python2 to Python3, the server environment can be changed by the programmer's will.
    Therefore, server-side languages ​​can be upgraded without backward compatibility.

    On the other hand, JavaScript is a client-side language (except for server environments such as Node.js).
    If ECMAScript has been upgraded to a version that is not backward compatible, users using older browsers that do not support the latest version will be truncated.
    Since the transition from "HTML4 to XHTML2" failed (IE6 share did not drop), the client side language (HTML, CSS, ECMAScript ... etc) will be upgraded to maintain backward compatibility as much as possible. There is a tendency.
    That's whytypeof nullspecification bugs will remain indefinitely, anddocument.allspecifically violates EMCAScript specifications(HTML Standard ) Has been formulated.

    console.log (typeof null);// "object" (should normally return "null")
    console.log (Boolean (document.all));// exists
    if (! document.all) {// This behavior deliberately violates the ECMAScript specification (HTML Standard)
      console.log ('document.all is falsy')

    As far as I know, the update that is no longer backward compatible is about "removal ofObject.prototype .__ proto __" that was standardized by reverse importing from the original extension.

    Object.prototype.proto-JavaScript | MDN

    That's why ES5 is a specification that works with the latest browsers today.

    ※ In the stage of reading the specification, there are parts where the internal operation has changed greatly, butIf you write the same code, the same result will be returnedSex is guaranteed.

    Object.prototype.toStringnow returns@@ toStringTaginstead of[[Class]]

    Array.prototype [@@ iterator]is now used for element enumeration ofnew Array

    Re: takenoko_sand