Array.from() 方法对一个类似数组或可迭代对象创建一个新的,浅拷贝的数组实例,把字符串或类似数组转成数组。

Array.from('hello'); //['h','e','l','l','o']

//或者
const items=new Set([1,2,3,4])
const array=Array.from(items) //[1,2,3,4]