如下代码,在严格模式下,如果删除 Object.prototype 浏览器会报错,目前 IE10 也支持 严格模式。
<script>
"use strict";
delete Object.prototype;
</script>
运行时会报以下错误。
Uncaught TypeError: Cannot delete property 'prototype' of function Object() { [native code] }
at 2.strict_deleteprop.html:14