[JavaScript]/[JavaScript] 개념 모음
[JS 개념] arrays(배열)
노트포미
2023. 4. 20. 00:12
arrays(배열)
: 단일 변수 이름 아래에 여러 항목 모음을 저장할 수 있는 개체
<특징>
- 크기 조정이 가능하고, 다양한 데이터 유형을 혼합하여 포함할 수 있다.
- 연관 배열이 아니므로, array elements cannot be accessed using arbitrary strings as indexes, but must be accessed using nonnegative integers (or their respective string form) as indexes.(이해X)
- 인덱스는 0부터 시작한다. (첫 요소의 index는 0,두번째 요소의 index는 1 ... 마지막 요소는 array's length -1)
- 배열을 복사하면, 얕은 복사가 된다.(이해X)
(참조) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
1st 기록 : 23.04.20(목)