牛客630716697号
牛客630716697号
全部文章
分类
题解(7)
归档
标签
去牛客网
登录
/
注册
牛客630716697号的博客
全部文章
(共5篇)
题解 | #智能提示#
function suggest(items) { window.items=items; let input=document.getElementsByClassName('js-input')[0]; input.addEventListener('input', on...
2021-06-13
1
406
题解 | #倒计时#
function second(second) { let day=Math.floor(second/(60*60*24)), hour=Math.floor((second%(60*60*24))/(60*60)), min=Math.floor(seco...
2021-06-12
0
522
题解 | #乘法#
思路:先换成整数,再乘,再除 function multiply(a, b) { let s1=a.toString(), s2=b.toString(), m=0; if(s1.includes('.')){ m+=s1.split('.')[1].length ...
2021-06-11
0
409
题解 | #二进制转换#
function convertToBinary(num) { let res=num.toString(2); return res.length<8?new Array(8-res.length).fill(0).join('')+res:res; }
2021-06-10
10
639
题解 | #模块#
function createModule(str1, str2) { this.greeting=str1; this.name=str2; this.sayIt=()=>this.greeting+', '+name; return this; }
2021-06-10
3
657