
es6
绿茶程序媛
喜欢请关注~
展开
-
求数组中的最大值
let arr = [5, 6, 2, 3, 99, 8]; let max = Math.max(...arr); console.log(max); //99 Math.max 不可以直接传入数组,只可以传入一系列数字原创 2020-01-22 11:58:09 · 154 阅读 · 0 评论 -
es6 不传值的时候定义默认值
Vue.filter('timeTrans', function (time, param1='aa-bb') { console.log(param1); let y = time.getFullYear(); let m = time.getMonth() + 1; let d = time.getDate(); ...原创 2019-12-22 10:54:00 · 434 阅读 · 0 评论