Day-6 Array

So Eun Ahn·2021년 1월 7일
0

JavaScript

목록 보기
9/26
post-thumbnail

array

array: are a such a data structure(big container) that holds chunck of values that can be referenced later
we can call it from the 0, not from 1
Array is not primitive values, so it can be mutated and changed even with const variables.
Array can hold different types of value at the same time for example

const firstName = 'Sso';
const sso = [firstName, 'Sso', 2037 - 1992, 'Director', friends];

add element

Add Element: push(), unshift()
returns the lenght of the new array

remove element

Remove Element: pop(),shift()
returns removed element

index

index return the index at which this element is located

includes

includes new concept, gives true/false

profile
오늘도 새로운 도전을 한다

0개의 댓글