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