코드:
결과보기 »
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>JavaScript Array</title> </head> <body> <h1>Array.isArray() 메소드</h1> <script> var arr = [1, true, "JavaScript"]; // 배열 생성 document.write(Array.isArray(arr) + "<br>"); // true document.write(Array.isArray("문자열")); // false </script> </body> </html>