大前端面试题库
碎片时间刷刷题
问答题
代码题
FlexBox 可视化学习
博客
作者
资料下载
大前端面试题库
碎片时间刷刷题
问答题
代码题
博客
资料下载
关注本站公众号,
获取永久访问授权码
扫码关注,回复『刷题』即可.
~代码题~
No.1
500张骨牌整齐地排成一行,按顺序编号为1、2、3、……、
思考一下,点击这里对比答案或解析~
No.2
实现一个拼手气抢红包算法
思考一下,点击这里对比答案或解析~
No.3
【代码题】实现一个React的useState hook
思考一下,点击这里对比答案或解析~
No.4
写出下面代码的运行结果(哔哩哔哩)!
思考一下,点击这里对比答案或解析~
No.5
京东
-这个题好像有点难
思考一下,点击这里对比答案或解析~
点击加载更多...
关于作者
zz_jesse 专注前端
掘金
我的开源项目
公众号@前端技术江湖
一个可以帮开发者成长的公众号
前端面试题库更新通知
前端学习资料、干货文章
技术交流群
交流中成长
大厂内推机会
You need to enable JavaScript to run this app.
eyJpbml0aWFsRGF0YSI6eyIvaXFjb2RlIjp7ImluaXQiOnRydWUsInJlcyI6eyJwYWdlIjp7InRkayI6eyJ0aXRsZSI6IuS7o+eggemimCAtIOWkp+WJjeerr+mdouivlemimOW6ky3pnaLor5XliLfpopgiLCJrZXl3b3JkIjoi5YmN56uv6Z2i6K+V6aKYLOWJjeerr+mdouivleWIt+mimCIsImRlc2NyaXB0aW9uIjoi5Zyo6L+Z6YeM5Yi36aKY5Y+v5Lul5pu06IqC57qm5L2g55qE5pe26Ze077yM55uu5YmN5pCc6ZuG5LqG5LyX5aSa55qE5YmN56uv6Z2i6K+V6aKY44CB57uP5YW46auY6aKR5YmN56uv6Z2i6K+V6aKY5ZKM5aSn5Y6C5YmN56uv6Z2i6K+V6aKY77yM5YaN5Lmf5LiN55So6Iqx5Yqb5rCU5Y675om+5YmN56uv6Z2i6K+V6aKY5LqG44CCIn19LCJmZXRjaERhdGEiOnsiY29kZUxpc3QiOlt7ImlkIjo4MTgsIm5ld1RpdGxlIjoiNTAw5byg6aqo54mM5pW06b2Q5Zyw5o6S5oiQ5Li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5DkvpvkuobkuIDkuKpSZWRQYWNrYWdl55qE57G777yM5Yid5aeL5YyW5pe25Lyg5YWl57qi5YyF6YeR6aKd5ZKM5Liq5pWw77yM6ZyA6KaB5a6e546w5LiA5Liqb3BlblJlZFBhY2thZ2Xmlrnms5XvvIzmr4/osIPkuIDmrKHpg73ov5vooYzkuIDmrKHigJzmiqLnuqLljIXigJ3vvIzlubbku6Vjb25zb2xlLmxvZ+eahOW9ouW8j+i+k+WHuuaKouWIsOeahOe6ouWMhemHkemineOAglxuXG5gYGBcbmNsYXNzIFJlZFBhY2thZ2Uge1xuICAgIG1vbmV5ID0gMDtcbiAgICBjb3VudCA9IDA7XG4gICAgX3JlbWFpbiA9IDA7XG4gICAgXG4gICAgY29uc3RydWN0b3IobW9uZXksIGNvdW50KSB7XG4gICAgICAgIHRoaXMubW9uZXkgPSBtb25leTtcbiAgICAgICAgdGhpcy5jb3VudCA9IGNvdW50O1xuICAgICAgICB0aGlzLl9yZW1haW4gPSBtb25leTtcbiAgICB9XG4gICAgXG4gICAgb3BlblJlZFBhY2tnZSgpIHtcbiAgICAgICAgLy8gIOW3sue7j+aKouWujOS6hlxuICAgICAgICBpZiAodGhpcy5jb3VudCA8PSAwKSB7XG4gICAgICAgICAgICBjb25zb2xlLmxvZygn57qi5YyF5bey57uP6KKr5oqi5a6M5ZWmficpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICAvLyAg5Y+q5Ymp5LiA5Liq57qi5YyFXG4gICAgICAgIGlmICh0aGlzLmNvdW50ID09PSAxKSB7XG4gICAgICAgICAgICB0aGlzLmNvdW50LS07XG4gICAgICAgICAgICBjb25zb2xlLmxvZyh0aGlzLl9yZW1haW4pO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICBjb25zdCByYXRpbyA9IE1hdGgucmFuZG9tKCkgKiAodGhpcy5fcmVtYWluIC8gdGhpcy5tb25leSk7XG4gICAgICAgIC8vICDov5nph4zkvJrmtonlj4rliLDkuIDkuKpKU+iuoeeul+eyvuW6pueahOmXrumimFxuICAgICAgICAvLyAg5q2j5bi45bqU6K+l55So56ys5LiJ5pa55bqT5oiW6ICF5a2X56ym5Liy566X5rOV5a6e546w5LiA5Liq57K+5YeG55qE5Yqg5YeP5LmY6ZmkXG4gICAgICAgIC8vICDov5nph4zkuLrkuobnroDljZXlsLHov5nkuYjnm7TmjqXlgZrkuoZcbiAgICAgICAgbGV0IHlvdUdldCA9ICh0aGlzLm1vbmV5ICogcmF0aW8pLnRvRml4ZWQoMik7XG4gICAgICAgIGNvbnN0IHRlbXBSZW1haW4gPSArKHRoaXMuX3JlbWFpbiAtIHlvdUdldCkudG9GaXhlZCgyKTtcbiAgICAgICAgY29uc3QgYWxsTGVhc3QgPSB0aGlzLmNvdW50ICogMC4wMTtcbiAgICAgICAgXG4gICAgICAgIC8vICDlpoLmnpzliankvZnnmoTph5Hpop3kuI3lpJ/mr4/kurrkuIDliIbpkrHvvIzpgqPkuYjpnIDopoHlh4/lsJHmnKzmrKHojrflvpfnmoTph5Hpop1cbiAgICAgICAgaWYgKHRlbXBSZW1haW4gPCBhbGxMZWFzdCkge1xuICAgICAgICAgICAgeW91R2V0ID0gKyh0aGlzLl9yZW1haW4gLSBhbGxMZWFzdCkudG9GaXhlZCgyKTtcbiAgICAgICAgICAgIHRoaXMuX3JlbWFpbiA9IGFsbExlYXN0O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5fcmVtYWluID0gdGVtcFJlbWFpbjtcbiAgICAgICAgfVxuICAgICAgICBjb25zb2xlLmxvZyh5b3VHZXQpO1xuICAgICAgICB0aGlzLmNvdW50LS07XG4gICAgfVxufVxuXG5gYGBcbuadpea6kDpodHRwczovL2p1ZWppbi5jbi9wb3N0LzcyOTgyMTg0NTk3OTU3MzQ1ODI/c2VhcmNoSWQ9MjAyNDAzMDMyMzI4NTI1NTk2QUQwRDMyNDh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