摘要: 数组 1.空数组 2.有值的 3..数组点的数值添加方式 (1)通过索引赋值来添加 数组的索引从0开始 var attr = [1,2,4,5];0: 1​1: 2​2: 4​3: 5​length: 4 attr[2]=3; console.log(attr); //会把原来索引是2的4,覆盖成3 阅读全文
posted @ 2018-04-12 23:26 鲁系大厨 阅读(148) 评论(0) 推荐(0) 编辑
摘要: //数学函数 //随机数0-1之间,0能取到,1取不到 //alert(Math.random()); //取圆周率 3.14 //alert(Math.PI); //取最大值 //alert(Math.max(1,2,5,9,)); //取最小值 //alert(Math.min(1,5,2,6,3)); //js获取当前时间 var a = new Date(); ... 阅读全文
posted @ 2018-04-12 22:03 鲁系大厨 阅读(119) 评论(0) 推荐(0) 编辑