자바에서는 배열의 크기가 한 번 정해지면 배열의 크기를늘리거나 줄일 수 없었음.
하지만, 자바스크립트에서는 배열 객체에 요소를 추가할 수 있음
push(요소) : 맨 마지막에 데이터를 추가
concat([추가할 요소1, 추가할 요소2, ... 추가할 요소n]);
unshift(요소) : 배열의 맨 앞(0번째 인덱스)에 추가하는 함수
shift() : 배열의 맨 처음 요소를 삭제하는 함수
pop() : 배열의 맨 마지막 요소를 삭제하는 함수

=============================코드=============================
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
let names = ["홍길동", "세종대왕", "유관순"];
document.write(`${names} <br/>`);
document.write(`<hr>`);
// unshift(요소) : 배열의 맨 앞(0번째 인덱스)에 추가하는 함수
names.unshift("이순신");
document.write(`${names} <br/>`);
document.write(`<hr>`);
// shift() : 배열의 맨 처음 요소를 삭제하는 함수
names.shift();
document.write(`${names} <br/>`);
document.write(`<hr>`);
// pop() : 배열의 맨 마지막 요소를 삭제하는 함수
names.pop();
document.write(`${names} <br/>`);
document.write(`<hr>`);
</script>
</head>
<body>
</body>
</html>
