Open lianjianbo opened 4 years ago
let first = ''; let second = ''; while (head) { first = first + head.val; second = head.val + second; head = head.next; } return first === second;
let temp = []; while (head) { temp.push(head.val); head = head.next; } for (let i = 0; i < temp.length / 2; i++) { if (temp[i] !== temp[temp.length - 1 - i]) { return false; } } return true;
地址:https://juejin.im/post/5df89b6451882512727f28bc
var reg = /^[y|Y] // 以y或者Y开头的任意字符串 let result1 = reg.test("yield") let result2 = reg.test("true") console.log(result1,result2) // =>true,false
地址:https://juejin.im/post/5dfb3e73f265da33b12ea9d3
ARTS第二十二周(2019.12.02-2019.12.08)
Algorithm 回文链表
Review 重学js系列——对象
地址:https://juejin.im/post/5df89b6451882512727f28bc
Tip 近期遇到的tips
Share 90%的前端都会踩的坑
地址:https://juejin.im/post/5dfb3e73f265da33b12ea9d3