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

Publié le: 08 février 2020
sur la chaîne: 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)


Sur cette page du site, vous pouvez voir la vidéo en ligne JavaScript Array Methods : Array.of() and Array() durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur TechFun 08 février 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 3,286 fois et il a aimé 0 téléspectateurs. Bon visionnage!