티스토리 뷰
Array Object 선언
1] Type
var myCars=new Array(); // regular array (add an optional integer
myCars[0]="Saab"; // argument to control array's size)
myCars[1]="Volvo";
myCars[2]="BMW";
2] Type
var myCars=new Array("Saab","Volvo","BMW"); // condensed array
3] Type
var myCars=["Saab","Volvo","BMW"]; // literal array
내용 출력
document.write(myCars[0]);
내용 수정
myCars[0]="Opel";
Array Object Methods
concat() Joins two or more arrays, and returns a copy of the joined arrays
join() Joins all elements of an array into a string(특정 문자를 삽입하여 배열요소를 연결할 수 있다.)
pop() Removes the last element of an array, and returns that element
shift() Removes the first element of an array, and returns that element (pop()의 반대 역확)
참조 사이트 : http://www.w3schools.com/jsref/jsref_obj_array.asp
- Total
- Today
- Yesterday
- 앱 스토어
- 제품 등록
- nl2br
- 아이폰
- 명령어
- await
- hyper-v
- .submit()
- 공백제거
- App Store
- MainActor
- FileUpload
- html tag
- async
- mssql
- system.io
- 문자 자르기
- trim
- 진수 변환
- In App Purchase
- System.Diagnostics
- Task
- 특정 문자를 기준으로 자르기
- 상품 등록
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |