good睡眠
good睡眠
全部文章
分类
归档
标签
去牛客网
登录
/
注册
good睡眠的博客
全部文章
(共5篇)
题解 | #判断是否包含数字#
function containsNumber(str) { let a = /[0-9]+/g; if(a.test(str)){ return true; }else{ return fals...
2024-04-10
0
145
题解 | #二进制转换#
function convertToBinary(num) { let newnum = num.toString(2); let length = num.toString(2).length; let a; if(length &l...
2024-04-10
0
155
题解 | #dom 节点查找#
function commonParentNode(oNode1, oNode2) { if(oNode1.contains(oNode2)){ return oNode1; }else{ return commonPa...
2023-08-30
0
250
题解 | #回文字符串#
const _isPalindrome = string => { // 补全代码 let a = [...string]; let b = [...string]; ...
2023-08-08
0
243
题解 | #相同的Set#
const _isSameSet = (s1, s2) => { for(let i = 0; i <s1.length; i++){ if( !s2.indexOf(s1[i])) re...
2023-07-05
0
300