2020年5月11日
摘要: this.province = [] this.province[0] = TextToCode[data[0].province].code this.province[1] = TextToCode[data[0].province][data[0].city].code this.provin 阅读全文
posted @ 2020-05-11 20:19 危险* 阅读(146) 评论(0) 推荐(0) 编辑
摘要: let 和 const 声明变量 let a = 1; const b = 2; 箭头函数 const sum = (a, b) => a + b; 模板字符串 const name = 'World'; console.log(`Hello ${name}`); 解构赋值 const { name 阅读全文
posted @ 2020-05-11 19:45 危险* 阅读(414) 评论(0) 推荐(0) 编辑
摘要: 深拷贝是 JSON.parse(JSON.stringify( array )) 数组去重的简单办法是 [...new Set(arr)] 阅读全文
posted @ 2020-05-11 16:55 危险* 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 把一个字符串转换成数组用split('') var str = '12134414' var arr = str.split(',') 把一个数组转换成字符串就是join()或者tostring() var arr = [1,2,3,4] var str = arr.join(',') 把几个字符串 阅读全文
posted @ 2020-05-11 16:51 危险* 阅读(108) 评论(0) 推荐(0) 编辑