牛客431995180号
牛客431995180号
全部文章
分类
题解(79)
归档
标签
去牛客网
登录
/
注册
牛客431995180号的博客
全部文章
(共55篇)
题解 | #检查重复字符串#
{"css":"","js":"function containsRepeatingLetter(str) {\n var result=str.match(/[A-z]{0,}/)\n \n var a=result[0]\n\n for(let i=0;i<a.len...
HTML/CSS/JavaScript
2022-04-02
0
252
题解 | #判断是否包含数字#
function containsNumber(str) { var reg=/[0-9]/ return reg.te...
HTML/CSS/JavaScript
2022-04-01
0
259
题解 | #将字符串转换为驼峰格式#
function cssStyle2DomStyle(sName) { var arr=sName.split('-') var str='' if(arr[0]===''){ str=arr[1] i=2 }else{ str=arr[0] i=1 } for(i;i<arr.length;...
HTML/CSS/JavaScript
2022-04-01
0
381
题解 | #颜色字符串转换#
{"css":"","js":"function rgb2hex(sRGB) {\n var reg= sRGB.match(/(\d{0,3},\s{0,}\d{0,3},\s{0,}\d{0,3})/g)\n if(!reg){return sRGB}\n var result=re...
HTML/CSS/JavaScript
2022-03-31
0
255
题解 | #二次封装函数#
{"css":"","js":"function strLength(s, bUnicode255For1) {\n var length=0\n if(!bUnicode255For1){\n for(let i=0;i<s.length;i++){\n ...
HTML/CSS/JavaScript
2022-03-31
0
250
题解 | #二次封装函数#
{"css":"","js":"function makeClosures(arr, fn) {\n var result=[]\n for(let i=0;i<arr.length;i++){\n result[i]=function(){\n ...
HTML/CSS/JavaScript
2022-03-30
0
259
题解 | #二次封装函数#
{"css":"","js":"function partial(fn, str1, str2) {\n return result=function(str3){\n return fn(str1,str2,str3)\n }\n}","html":"","libs":[...
HTML/CSS/JavaScript
2022-03-30
0
314
题解 | #返回函数#
{"css":"","js":"\nfunction functionFunction(str) {\n return function(arr){\n return str+", "+arr;\n };\n \n}","html":"","libs":[]}
HTML/CSS/JavaScript
2022-03-30
0
278
题解 | #流程控制#
function fizzBuzz(num) { return num%3===0&&num%5===0? 'fizzbuzz':(num%3===0? 'fizz':(num%5===0? 'buzz':(num===''||typeof num!='num...
HTML/CSS/JavaScript
2022-03-30
0
325
题解 | #计时器#
"function count(start, end) { console.log(start) var timer = setInterval( ()=>{ console.log(++start) while(start>=end){ clearInterval(timer) bre...
HTML/CSS/JavaScript
2022-03-30
0
269
首页
上一页
1
2
3
4
5
6
下一页
末页