用js语言参考中的话就是: The String object has no methods that are not part of the prototype. (String对象没有不是原型部分的方法,即String的所有方法都是原型部分的) The Math object has no methods that are part of the prototype. (Math对象没有原型部分的方法,即Math的所有方法都是非原型部分的)翻译的不知道是不是准确
但我在书上看到,以及网上查到的资料都说String是静态对象
prototype 属性:返回对象类型原型的引用。 用 prototype 属性提供对象的类的一组基本功能。对象的新实例“继承”赋予该对象原型的操作。 应用于: Array 对象 | Boolean 对象 | Date 对象 | Function 对象 | Number 对象 | Object 对象 | String 对象 但Global对象和Math对象除外
The String object has no methods that are not part of the prototype.
(String对象没有不是原型部分的方法,即String的所有方法都是原型部分的)
The Math object has no methods that are part of the prototype.
(Math对象没有原型部分的方法,即Math的所有方法都是非原型部分的)翻译的不知道是不是准确
用 prototype 属性提供对象的类的一组基本功能。对象的新实例“继承”赋予该对象原型的操作。
应用于: Array 对象 | Boolean 对象 | Date 对象 | Function 对象 | Number 对象 | Object 对象 | String 对象
但Global对象和Math对象除外