
ES6
xiaoYtou
每天进步一点点
展开
-
ES6数组扩展
1.Array.from用于将类似数组的对象和可遍历的对象转为真正的数组。Array.from('hello') //['h','e','l','l','0']Array.from([1,2,3],(x)=>x*x) //[1,4,9]2.Array.of将一组值转化为数组Array.of(3,11,8) //[3,11,8]Array.of(3) //[3]3.数组实例的co原创 2017-05-08 17:24:38 · 223 阅读 · 0 评论 -
横向文字滚动定义与引用
定义,文件名为singleLineMarqueeMgrComponent.jsimport UUID from 'uuid-js';class singleLineMarquee { constructor() { this.id = null; this.timer = null; } marqueeHTML(str, wid原创 2017-07-03 15:05:37 · 439 阅读 · 0 评论