牛客431995180号
牛客431995180号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客431995180号的博客
全部文章
/ 题解
(共20篇)
题解 | #模块#
{"css":"","js":"function createModule(str1, str2) {\n return {\n greeting:str1,\n name:str2,\n sayIt:function(){\n ...
HTML/CSS/JavaScript
2022-04-02
0
273
题解 | #柯里化#
{"css":"","js":"function curryIt(fn) {\n return function a(a){\n return function b(b){\n return function c(c){\n r...
HTML/CSS/JavaScript
2022-04-02
0
317
题解 | #二次封装函数#
{"css":"","js":"function partialUsingArguments(fn) {\n var arg1=[...arguments].slice(1)\n return function result(){\n var arg2=[...argume...
HTML/CSS/JavaScript
2022-04-02
0
325
题解 | #使用 arguments#
{"css":"","js":"function useArguments() {\n var sum=0\n for(let i=0;i<arguments.length;i++){\n sum+=arguments[i]\n }\n return sum\n}...
HTML/CSS/JavaScript
2022-04-02
0
267
题解 | #检查重复字符串#
{"css":"","js":"function useArguments() {\n var arr=[...arguments]\n var sum=0\n arr.forEach((item)=>{\n sum+=item\n })\n ret...
HTML/CSS/JavaScript
2022-04-02
0
274
题解 | #检查重复字符串#
{"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
首页
上一页
1
2
下一页
末页