목록sort() (1)
wasup

1. push(); : 배열 끝에 요소를 추가. //Array.push(); var arr6 = ['a', 'b', 'c']; arr6.push('d'); arr6.push(function(){alert('배열.push() 함수 호출')}); arr6.push(function(x, y){alert( x + ' + ' + y + ' = ' + x+y)}); document.write(''); for(var i = 0; i < arr6.length; i++){ document.write(''+typeof(arr6[i])+ '=' + arr6[i] + ''); } document.write(''); 2. pop(); : 배열의 마지막 요소를 꺼내온 후 삭제 //Array.pop(); var last = arr..
IT/html, css, script
2021. 4. 14. 16:58