码迷,mamicode.com
首页 > 编程语言 > 详细

js 字符串,数组扩展

时间:2019-04-14 13:59:35      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:sub   function   ret   highlight   扩展   ati   console   asc   turn   

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

  

js 字符串,数组扩展

标签:sub   function   ret   highlight   扩展   ati   console   asc   turn   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!