Strict mode, added in ES5, changes JavaScript semantics: engines throw errors instead of silently accepting some behavior, and some unsafe features are banned. One practical effect is that the arguments object no longer aliases matching function parameters. section 4.1.1
Listing 4.4. Using strict mode to avoid arguments aliasing
"use strict"; #A
function infiltrate(person){
assert(person === 'gardener', #B
'The person is a gardener'); #B
assert(arguments[0] === 'gardener', #B
'The first argument is a gardener'); #B
arguments[0] = 'ninja'; #C
assert(arguments[0] === 'ninja', #D
'The first argument is now a ninja'); #D
assert(person === 'gardener', #E
'The person is still a gardener'); #E
}
infiltrate("gardener");
With the "use strict" directive, changing arguments[0] to "ninja" leaves the gardener parameter unchanged. section 4.1.1
