js 字符串,数组扩展

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

  

原文地址:https://www.cnblogs.com/whlBooK/p/10704683.html