摘要:
语法 Array.prototype.copywithin(index, startIndex, endIndex) index 复制的数组项开始替换的起始索引值 start 复制的数组项的起始位置 end 复制的数组项的结束位置(不包含) 应用 删除数组中某一项 [].copyWithin(ind 阅读全文
摘要:
const CookieUtil = { get(name){ let cookieName = `${encodeURIComponent(name)}=` let cookieStart = document.cookie.indexOf(cookieName) let cookieValue 阅读全文
摘要:
/** * 十进制转换为2~36的任意进制 */ const baseConverter = (number = 12138, base = 2) => { if(base < 2 || base > 36) return new Error('进制参数错误') const stack = [] c 阅读全文
摘要:
发现一个很有意思的事 /** * Array.of 是否为浅拷贝 */ const arr = [1, { x: 1 }] const arrOf = Array.of(...arr) console.log('arr',arr) arrOf[0] = 'zjy' arrOf[1].x = 'zjy 阅读全文