var friends = ["mj", "sj", "wj"];
friends[0]
friends.push('ny');
friends.length
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<h1>Array</h1>
<h2>Syntax</h2>
<script>
var friends = ["mj", "sj", "wj"];
</script>
<h2>get</h2>
<script>
document.write(friends[0]);
document.write(friends[1]);
document.write(friends[2]);
</script>
<h2>add</h2>
<script>
friends.push('ny');
</script>
<h2>count</h2>
<script>
document.write(friends.length);
</script>
</body>
</html>