"use strict" in javascript -
this question has reply here:
what “use strict” in javascript, , reasoning behind it? 16 answersi have been reading many javascript codes , wondering of benefits of using "use strict". thought much appreciated.
before go , set "use strict" on scripts, warning:
browsers not back upwards strict mode, run code different behavior browsers do.
now, reply question. benefits of strict mode are:
some errors no longer silent , throw instead. allows interpreter create optmizations. prohibits syntax deprecated in next version of ecmascript.(source: https://developer.mozilla.org/en-us/docs/javascript/reference/functions_and_function_scope/strict_mode)
javascript use-strict
No comments:
Post a Comment