front-end/JavaScript

#1.3 Arrays

gaan 2022. 7. 5. 23:17

배열

1. array 의 목적

- 하나의 variable 안에 데이터의 list를 가지는 것

 

2. How?

const daysOfWeek = ["mon", "tue", "wed", "thu", "fri", "sat"];

// Add one more day to the array
daysOfWeek.push("sun");

console.log(daysOfWeek[0]);
//mon