배열함수1 자바스크립트 배열 개념과 APIs 'use strict' //Array //1.Declaration const arr1 =new Array(); const arr2 =[1,2]; //2.Index position const fruits = ['🍎','🍌']; console.log(fruits); console.log(fruits.length); console.log(fruits[0]); console.log(fruits[1]); console.log(fruits[2]); console.log(fruits[fruits.length-1]); //3.looping over an array //print all fruits //a.for for(let i =0; i fruits.forEach((fruit) => console.log(fruit).. 2021. 12. 7. 이전 1 다음