코드:
결과보기 »
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>JavaScript Array Object</title> </head> <body> <h1>reverse() 메소드</h1> <script> var arr = [1, true, "JavaScript", "자바스크립트"]; document.write(arr.reverse()); // [자바스크립트,JavaScript,true,1] </script> </body> </html>