day52 参考:https://www.cnblogs.com/liwenzhou/p/8004649.html 函数 函数定义 JavaScript中的函数和Python中的非常类似,只是定义方式有点区别. function foo(a, b) { console.log("a:", a) console.log("b:", b) return a+b; }; //匿名函数 var func = function (a, b){ console.log(&quo…
数组相关方法 concat 用来连接多个数组 <script> var a = [1,2,3]; var b = [3,4,5]; var c = a.concat(b); console.log(c); // [1,2,3,3,4,5,] </script> concat join 把数组元素拿出来,根据指定的符号连接成一个字符串 <script> var a = [1,2,3]; var b = a.join('|'); console.log(b); // 1|…
JavaScript内置函数:Date时间<script> var today=new Date(); weeks=["日","一","二","三","四","五","六"];//用于显示星期几 document.write(today+"<br/>");//输出当前时间:Fri May 03 2019 2…