首页 > 其他分享 >扩展运算

扩展运算

时间:2023-02-10 19:22:05浏览次数:34  
标签:... chuan 运算 扩展 boby 数组

介绍

扩展运算符能将[数组]转换为逗号分隔的[参数序列]

声明一个数组

我们可以通过  ... 的方式  转换成参数序列

声明一个函数:

const boby =['张倩','李旺','赵茜']
        
        function chuan(){
            console.log(arguments);
        }
        chuan(...boby)

 

标签:...,chuan,运算,扩展,boby,数组
From: https://www.cnblogs.com/0722tian/p/17105989.html

相关文章