this
will not refer to window
object
callee
, caller
of arguments
object are not allowed under strict mode
- under strict mode
parameter
is not refereced linked to arguments
object, no strict mode, parameter
is a reference of the arguments
object.
(function() {
var nostrict = function(x) {
arguments[0] = 'modified';
console.log('arguments[0] =', arguments[0]);
console.log('x=', arguments[0]);
console.log('under non-strict mode,', x === arguments[0]); // log true
};
var strict = function(x) {
'use strict';
arguments[0] = 'modified';
console.log('arguments[0] =', arguments[0]);
console.log('x=', arguments[0]);
console.log('under strict mode', x === arguments[0]); // log false
};
nostrict('unmodified');
strict('unmodified');
})();