Last active
December 22, 2015 03:19
-
-
Save srkmrs/6409678 to your computer and use it in GitHub Desktop.
Revisions
-
srkmrs revised this gist
Sep 3, 2013 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ By marking the top of the script block or function with the "use strict” directive, the compiler will provide early warnings and errors for common coding mistakes, and restrict the usage of some dark corners of the JavaScript language. Let you see how the following sample code interact with Strict Mode. -
srkmrs revised this gist
Sep 2, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ By marking the top of the script block or function with the "use strict” directive, the compiler will provide early warnings and errors for common coding mistakes, and restrict the usage of some dark corners of the JavaScript language. Let you see how the following sample code interact with Strict Mode. Code -
srkmrs created this gist
Sep 2, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ By marking the top of the script block or function with the "use strict” directive, the compiler will provide early warnings and errors for common coding mistakes, and restrict the usage of some dark corners of the JavaScript language. Let you see how thefollowing sample code interact with Strict Mode. Code "use strict"; a = 100; b = 200; document.write(a + b); Results Error was detected; no results were produced. Errors Uncaught ReferenceError: a is not defined Expected Code "use strict"; var a = 100; var b = 200; document.write(a + b); Results 300 Errors No errors. (Note that Strict Mode is still under development in many browsers.)