上回说到,基础之篇,看久必新,新久必看。
这回我们来说说除了基础篇之外的一些花里胡哨的东西。
//字面量方式创建 var colors = [‘red‘,‘white‘,‘black‘] console.log(colors)
输出结果如下:
// 使用构造函数创建数组 var heroes = new Array(); heroes[0] = ‘Marvelous‘; heroes[1] = ‘Riven‘; heroes[2] = ‘Lee Sin‘; console.log(heroes);
字符串方法
具体代码操作:后续补充
原文:https://www.cnblogs.com/swearBM/p/10023699.html