Array.of()方法的使用:
Array.of()方法用于将一组数值转换为数组,举例:
const a = Array.of(2,4,6,8); console.log(a); // [2,4,6,8] const b = Array.of(1); console.log(b); // [1] const c = Array.of(1).length; console.log(c); // 1
Array.of()方法的使用:
Array.of()方法用于将一组数值转换为数组,举例:
const a = Array.of(2,4,6,8); console.log(a); // [2,4,6,8] const b = Array.of(1); console.log(b); // [1] const c = Array.of(1).length; console.log(c); // 1
内容版权声明:除非注明,否则皆为本站原创文章。