JS数组操作 常用操作声明数组const fruits = new Array('Apple', 'Banana'); console.log(fruits.length); // 通过数组字面量创建一个有2个元素的'fruits'数组. const xmxe JS 代码实战 编写JavaScript代码的小技巧 生成随机颜色/随机数/Boolean值// 生成随机颜色 const generateRandomHexColor = () => Math.floor(Math.random() * 0xffffff).toStrin xmxe JS 代码实战 JavaScript相关 NoteJQuery、JS常用方法// json字符串 var str1 = '{"name":"cxh","sex":"man"}'; // json对象 var str2 = {name:"cxh",sex xmxe JS 代码实战