JavaScript Array Methods : Array.of() and Array()

Published: 08 February 2020
on channel: TechFun
3,286
0

Please check this article for more details
https://www.techwithfun.com/11-must-k...

JavaScript Array Methods : Array.of() and Array()
usage and differences of Array.of() and Array() in JavaScript ES6

/* Array.of */

const myArray1 = Array.of(20);
console.log('MyArray 1: ', myArray1, ' length : ', myArray1.length)

const myArray2 = Array.of(20,30,40);
console.log('MyArray 2: ', myArray2, ' length : ', myArray2.length)

/* Array */

const myArray3 = Array(5);
console.log('MyArray 3: ', myArray3, ' length : ', myArray3.length)


On this page of the site you can watch the video online JavaScript Array Methods : Array.of() and Array() with a duration of hours minute second in good quality, which was uploaded by the user TechFun 08 February 2020, share the link with friends and acquaintances, this video has already been watched 3,286 times on youtube and it was liked by 0 viewers. Enjoy your viewing!