01 2021 档案
摘要:转时间格式 moment().format("YYYY-MM-DD") // 2020-01-26 再转标准时间 new Date('2021-01-26') // Fri Jun 05 2020 09:17:00 GMT+0800 (中国标准时间)
阅读全文
摘要:git rebase 误操作导致文件丢失撤销并恢复文件 第一步 执行 git reflog查看本地操作记录 找到本次rebase之前的操作id 例如:89356d0 第二步 执行恢复命令 git reset --hard 89356d0 出现提示则输入y确认
阅读全文
摘要:1.indexOf() -> ES5:返回索引,大于0则存在,-1不存在 const array = ['apple', 'banance', 'orange'] array.indexOf('apple') // 0 存在 array.indexOf('strawBerry') // -1不存在
阅读全文