- 博客(2)
- 收藏
- 关注
原创 高频面试题,(4)js种最简单数组扁平化
数组扁平化 数组扁平化是指将一个多维数组变为一个一维数组。 ①使用flat const arr=[1,[2,[3,[4,5]]],6] const res1=arr.flat(Infinity)//使用 Infinity 作为深度,展开任意深度的嵌套数组 console.log(res1); //Array(6) 1,2,3,4,5,6 ②正则 const arr2=[1,[2,[3,[4,5]]],6] const res2=JSON
2021-05-19 11:30:21
76
原创 模拟验证码
css: <style> *{margin:0;padding:0;} .warp{width:400px;height:200px;margin:auto;} .auth-code{width:150px;height:30px;border:3pxsolidred;text-align:center;line-height:30px;} .txt{width:...
2020-11-28 12:54:48
161
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人