- 博客(4)
- 收藏
- 关注
原创 reduce()方法
reduce()方法 reduce()方法用于对数组中的所有元素调用指定的回调函数,该回调函数的返回值为累积结果,并且此返回值在下一次调用该回调函数时作为参数提供 语法: array1.reduce(callbackfn[, initialValue]) 参数...
2018-06-26 15:01:44
20753
转载 china.js
(function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['exports', 'echarts'], factory); } else ...
2018-03-02 18:03:48
4465
翻译 回车触发事件
回车键触发事件 document.onkeydown = function (event) { var e = event || window.event || arguments.callee.caller.arguments[0]; if (e && e.keyCode == 13) { // enter 键 //要做的事情
2018-02-05 18:01:18
417
转载 ES6
ECMAScript中的let和const命令 let命令 基本用法 ES6新增的let命令,用来声明变量。其用法类似于var,但是所声明的变量,只在let命令所在的代码块内有效。 { let a = 10; var b = 1; } a //a is not defined. b // 1 上面代码在代码块之中,分别用let和var声明了两个变量。然后在代码
2018-02-05 17:56:07
217
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人