console.log(Array.prototype.sort)//ƒ substring() { [native code] } console.log(String.prototype.substring) //字符串扩展 String.prototype.addstring = function(){ return this+'字符串扩展' } console.log('ff'.addstring())//ff字符串扩展
console.log(Array.prototype.sort)//ƒ substring() { [native code] } console.log(String.prototype.substring) //字符串扩展 String.prototype.addstring = function(){ return this+'字符串扩展' } console.log('ff'.addstring())//ff字符串扩展