当前位置:网站首页>JS divides an array into groups of three
JS divides an array into groups of three
2022-07-02 06:50:00 【xuefankang】
var data = [
{name:'xue',age:'20'},
{name:'bing',age:'21'},
{name:'hu',age:'22'},
{name:'wang',age:'23'},
{name:'li',age:'24'},
{name:'wan',age:'25'},
{name:'kang',age:'25'},
{name:'hua',age:'26'},
{name:'kai',age:'27'},
{name:'fang',age:'28'},
]
var result = [];
for(var i=0;i<data.length;i+=3){
result.push(data.slice(i,i+3));
}
边栏推荐
- 如何调试微信内置浏览器应用(企业号、公众号、订阅号)
- Idea announced a new default UI, which is too refreshing (including the application link)
- pytest(3)parametrize参数化
- Kali latest update Guide
- AWD learning
- Tensorrt command line program
- Linux MySQL 5.6.51 Community Generic 安装教程
- Overload global and member new/delete
- MySQL index
- Linux MySQL 5.6.51 community generic installation tutorial
猜你喜欢
Sentinel rules persist to Nacos
ZZQ的博客目录--更新于20210601
Win10:添加或者删除开机启动项,在开机启动项中添加在用户自定义的启动文件
The table component specifies the concatenation parallel method
AWD学习
Latex在VSCODE中编译中文,使用中文路径问题解决
Unexpected inconsistency caused by abnormal power failure; Run fsck manually problem resolved
pytest(1) 用例收集规则
The win10 network icon disappears, and the network icon turns gray. Open the network and set the flash back to solve the problem
Latest CUDA environment configuration (win10 + CUDA 11.6 + vs2019)
随机推荐
Sentinel rules persist to Nacos
Automation - when Jenkins pipline executes the nodejs command, it prompts node: command not found
js数组的常用的原型方法
20210306转载如何使TextEdit有背景图片
Fe - wechat applet - Bluetooth ble development research and use
Apt command reports certificate error certificate verification failed: the certificate is not trusted
Win10:添加或者删除开机启动项,在开机启动项中添加在用户自定义的启动文件
Vscode installation, latex environment, parameter configuration, common problem solving
Kotlin - verify whether the time format is yyyy MM DD hh:mm:ss
[literature reading and thought notes 13] unprocessing images for learned raw denoising
table 组件指定列合并行方法
20201025 Visual Studio2019 QT5.14 信号和槽功能的使用
记录一次RDS故障排除--RDS容量徒增
Fe - use of weex development weex UI components and configuration use
How to debug wechat built-in browser applications (enterprise number, official account, subscription number)
After reading useful blogs
Render minecraft scenes into real scenes using NVIDIA GPU
JS modification element attribute flipping commonly used in selenium's Web Automation
Virtualenv and pipenv installation
CUDA and Direct3D consistency