배열 [ ]
(Array)
1. 배열의 생성과 데이터 불러오기
var name = ['egoing', 'leezche', 'taeho']
alert(name[0]); //egoing
alert(name[1]); //leezche
alert(name[2]); //taeho예시) 데이터 불러오기, 개수 세기, 추가

Last updated
(Array)
var name = ['egoing', 'leezche', 'taeho']
alert(name[0]); //egoing
alert(name[1]); //leezche
alert(name[2]); //taeho
Last updated
<h1>Array</h1>
<h2>Syntax(문법)</h2>
<script>
var coworkers = ["west", "silver"];
</script>
<h2>get</h2> //데이터 불러오기
<script>
document.write(coworkers[0]);
document.write(coworkers[1]);
</script>
<h2>count</h2> //개수 세기
<script>
document.write(coworkers.length);
</script>
<h2>add</h2> //데이터 추가
<script>
coworkers.push('seoeun');
coworkers.push('redcho');
</script>
<h2>count</h2> //개수 세기
<script>
document.write(coworkers.length);
</script>