随笔分类 - es6
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <script src="https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.21/lodash.js"></scr
阅读全文
摘要:const j = {name:'佩奇',age:5} const keys = Object.keys(j) const values = Object.values(j) console.log(keys) console.log(values)
阅读全文
摘要://数组 - - //结构赋值 // const arr = [[2,6,8],4,9] // let [a,b,c] = arr // console.log(a) //2 // console.log(b) //4 // console.log(c) //9 //交换变量 // let a =
阅读全文
摘要://剩余参数 function sum(...arr){ console.log(arr) } sum(3,4,5,6) // 求数组最大值 let arr = [1,44,7,88] console.log(Math.max(...arr)) //合并数组 let arr2 = [2,5,77]
阅读全文