"use strict"严格模式 顾名思义,这种模式使得Javascript在更严格的条件下运行

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>

var run = function(fromWhom){
    arguments[0] = 'alien';
    alert(fromWhom);
}
run('zombie');
// alert: 'alien';

var run = function(fromWhom){
    "use strict";
    arguments[0] = 'alien';
    alert(fromWhom);
}
run('zombie');
// alert: 'zombie';
  </script>
</body>
</html>

你可能感兴趣的:(JavaScript)