首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
AlmondNutella
Thoughtworks_Developer
获赞
76
粉丝
0
关注
7
看过 TA
44
男
Western University
2021
前端工程师
IP属地:湖北
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑AlmondNutella吗?
发布(37)
评论
刷题
AlmondNutella
关注TA,不错过内容更新
关注
2021-11-03 12:21
Thoughtworks_Developer
题解 | #平方根#
{"css":"","js":"function _sqrt(number) { if(number === 1 || number === 0) return number; let low = 0; let high = number; while(low < high){ let p = (low + high)>>1; if( p * p === number) return p; else if(p * p < number) ...
0
点赞
评论
收藏
分享
2021-11-03 11:29
Thoughtworks_Developer
题解 | #幂#
{"css":"","js":"function _pow(number,power) {\n // 补全代码\n let res = 1;\n while(power > 0){\n res *= number;\n power--;\n }\n return res;\n}","html":"","libs":[]}
0
点赞
评论
收藏
分享
2021-11-03 11:26
Thoughtworks_Developer
题解 | #绝对值#
{"css":"","js":"function _abs(number) {\n // 补全代码\n if(number < 0) return 0-number;\n else return number\n}","html":"","libs":[]}
0
点赞
评论
收藏
分享
2021-11-03 00:39
Thoughtworks_Developer
2021-11-03
在牛客打卡1天,今天学习:刷题 5 道/代码提交 5 次
每日监督打卡
0
点赞
评论
收藏
分享
2021-11-03 00:39
Thoughtworks_Developer
题解 | #this指向#
{"css":"","js":"var obj = {\n a: 1,\n b: 2,\n fn: function(){\n // 补全代码\n return this.a + this.b;\n }\n}","html":"","libs":[]} 因为题目对象里面的函数是function而不是箭头函数, 所以里面this的指向就是该对象
0
点赞
评论
收藏
分享
2021-11-03 00:36
Thoughtworks_Developer
题解 | #阶乘#
{"css":"","js":"function _factorial(number) {\n // 补全代码\n if(number === 1) return 1;\n return number * _factorial(number - 1)\n}","html":"","libs":[]} 确认base case是number为1的时候返回就可以写出来了
0
点赞
评论
收藏
分享
2021-11-03 00:30
Thoughtworks_Developer
题解 | #数据类型转换#
{"css":"","js":"function _splice(left,right) {\n // 补全代码\n let s1 = String(left);\n let s2 = String(right);\n return s1.concat(s2)\n}","html":"","libs":[]} 利用String()方法把数据的类型转成字符串, 最后使用字符串的concat()方法将两个新字符串串联起来.
0
点赞
评论
收藏
分享
2021-11-03 00:27
Thoughtworks_Developer
题解 | #基本数据类型检测#
{"css":"","js":"function _typeof(value) {\n // 补全代码\n let res = Object.prototype.toString.call(value).split(' ');\n \n return res[1].split(']')[0].toLowerCase()\n}","html":"","libs":[]} Object.prototype.toString.call()可以获取数据的类型, 返回的结果是[Object 数据类型]. 通过数组split的方法获得数据类型最后返回.
0
点赞
评论
收藏
分享
2021-11-03 00:23
Thoughtworks_Developer
题解 | #检测复杂数据类型#
{"css":"","js":"function _instanceof(left,right) {\n // 补全代码\n let proto = left.proto;\n let prototype = right.prototype;\n while(true){\n if(proto === null) return false;\n if(proto === prototype) return true;\n proto = proto.proto;\n }\n}","html":"","libs":[]}
0
点赞
评论
收藏
分享
2021-11-02 19:02
Thoughtworks_Developer
题解 | #CSS单位(二)#
{"css":"div {\n /*补全代码*/\n height: 4rem;\n width: 4rem;\n}","js":"","html":"<div></div>","libs":[]} rem是相对于HTML标签字体大小的单位
0
点赞
评论
收藏
分享
2021-11-02 19:02
Thoughtworks_Developer
题解 | #CSS单位(一)#
{"css":".box {\n /*补全代码*/\n height: 4em;\n width: 4em;\n}","js":"","html":"<div class='box'></div>","libs":[]} em是相对于自身字体大小的单位
0
点赞
评论
收藏
分享
2021-11-02 18:59
Thoughtworks_Developer
题解 | #行内元素垂直水平居中#
{"css":"p {\n width: 800px;\n height: 40px;\n border: solid 1px black;\n /*补全代码*/\n text-align: center;\n line-height: 40px;\n}","js":"","html":"<p>牛客网,是一个集笔面试系统、题库、课程教育、社群交流、招聘内推于一体的招聘类网站。</p>","libs":[]} 水平居中 - text-align: center 垂直居中 - line-height: 盒子高度
0
点赞
评论
收藏
分享
2021-11-02 18:57
Thoughtworks_Developer
题解 | #绝对定位#
{"css":".wrap {\n width: 100px;\n height: 100px;\n border: solid 1px black;\n /*补全代码*/\n position: relative;\n}\n.btn {\n width: 20px;\n height: 20px;\n text-align: center;\n background-color: red;\n /*补全代码*/\n position:absolute;\n top: -10px;\n right: -10px;\n...
0
点赞
评论
收藏
分享
2021-11-02 18:18
Thoughtworks_Developer
题解 | #浮动和清除浮动#
{"css":".wrap {\n /*补全代码*/\n display: inline-block;\n}\n .left {\n width: 100px;\n height: 100px;\n /*补全代码*/\n float:left;\n}\n .right {\n width: 100px;\n height: 100px;\n /*补全代码*/\n float:left;\n}","js":"","html":"<div class='wrap'>\n\t<div class='left'><...
0
点赞
评论
收藏
分享
2021-11-02 17:51
Thoughtworks_Developer
题解 | #设置盒子宽高#
{"css":"/*补全代码*/\n.box{\n height:100px;\n width: 100px;\n padding: 20px;\n margin: 10px;\n}","js":"","html":"<div class=\"box\">\n</div>","libs":[]} margin设置外间距; padding设置内间距;
0
点赞
评论
收藏
分享
1
2
3
关注他的用户也关注了:
牛客网
牛客企业服务