Javascript Versions


#1

Hello fellow Coders,
I have a question about things like --
"use strict" , "console was used before it was defined" and other things. You can see in the image below.

As you can see at the bottom of image. [Editor: Brackets]
I had searched about it and It says It is used in ECMA 5.x of Js.
I also heard that there is Ecma 6/7 in market? good resources and suggestions would be helpful. Thank you : ))


#2

'use strict' is a feature that was added in ECMAScript 5. I'm going to give you the main snippets from this article by John Resig, but feel free to read the entirety of it on your own.

And:

Strict mode helps out in a couple ways:


  • It catches some common coding bloopers, throwing exceptions.

  • It prevents, or throws errors, when relatively "unsafe" actions are taken (such as gaining access to the global object).

  • It disables features that are confusing or poorly thought out.

As far as looking into Ecma 6/7, you should look at the Mozilla's MDN for 6 and their 2016 update

Happy Coding :slight_smile:


#3

Precise and to the point.
I have looked up the Mozilla links (Tho I still have to complete Jscript documentation of MDN).
I'll look up the Resig's article, bookmarked. I'll message if I stuck somewhere.
Respect, Thank you. :slight_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.