Рет қаралды 47
if you use "use strict"; you will see that twice: 1, 2, 3, undefined
"use strict";
function log(a, b, c, d) { console.log(a, b, c, d) arguments[0] = 'bfe' // in strict mode arguments-array and variables a, b, c, d it's not the // same. If you change arguments-array, variables will not be changed. arguments[3] = 'dev'
console.log(a, b, c, d) }
log(1, 2, 3) // "1, 2, 3, undefined" you can see that twice
Why do developers use not strict mode?