前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >今天由我亲自给大家总结

今天由我亲自给大家总结

作者头像
前朝楚水
发布2018-04-02 14:52:33
6010
发布2018-04-02 14:52:33
举报
文章被收录于专栏:互联网杂技

javascript内置对象有哪些?

reg正则,booer,math,string,arr,obj,number,date,function,window全局,error,json

在这些对象的原型上有一些方法,可以到这个网站查看http://lzw.me/pages/ecmascript/。

我下面罗列一些比较有用的

对数组的操作方法,

Array.prototype.toString ( )

Array.prototype.toLocaleString ( )

Array.prototype.concat ( [ item1 [ , item2 [ , … ] ] ] )

Array.prototype.join (separator)

Array.prototype.push ( [ item1 [ , item2 [ , … ] ] ] )

Array.prototype.pop ( )

Array.prototype.reverse ( )

Array.prototype.reduceRight ( callbackfn [ , initialValue ] )

Array.prototype.reduce ( callbackfn [ , initialValue ] )

Array.prototype.shift ( )

Array.prototype.slice (start, end)

Array.prototype.sort (comparefn)

Array.prototype.forEach ( callbackfn [ , thisArg ] )

Array.prototype.every ( callbackfn [ , thisArg ] )

Array.prototype.some ( callbackfn [ , thisArg ] )

Array.prototype.lastIndexOf ( searchElement [ , fromIndex ] )

Array.prototype.indexOf ( searchElement [ , fromIndex ] )

Array.prototype.unshift ( [ item1 [ , item2 [ , … ] ] ] )

Array.prototype.splice (start, deleteCount [ , item1 [ , item2 [ , … ] ] ] )

Array.prototype.map ( callbackfn [ , thisArg ] )

Array.prototype.filter ( callbackfn [ , thisArg ] )

对字符串的操作方法

String.prototype.toString ( )

String.prototype.trim ( )

String.prototype.toLocaleUpperCase ( )

String.prototype.toUpperCase ( )

String.prototype.toLocaleLowerCase ( )

String.prototype.toLowerCase ( )

String.prototype.substring (start, end)

String.prototype.split (separator, limit)

String.prototype.slice (start, end)

String.prototype.search (regexp)

String.prototype.replace (searchValue, replaceValue)

String.prototype.match (regexp)

String.prototype.localeCompare (that)

String.prototype.lastIndexOf (searchString, position)

String.prototype.indexOf (searchString, position)

String.prototype.valueOf ( )

String.prototype.concat ( [ string1 [ , string2 [ , … ] ] ] )

String.prototype.charAt (pos)

String.prototype.charCodeAt (pos)

String.prototype.substr(start, length)

math

max ( [ value1 [ , value2 [ , … ] ] ] )

min ( [ value1 [ , value2 [ , … ] ] ] )

pow (x, y)

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2016-01-12,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 交互设计前端开发与后端程序设计 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档