问题标签 [method-hiding]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
39 浏览

methods - 方法隐藏和没有“新”关键字有什么区别?

这是隐藏的方法:

没有“new”关键字的相同代码:

这些有什么区别?

编辑:在生成的 C 代码中绝对没有区别,所以我认为编译的二进制文件是相同的。