코드:
결과보기 »
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>JavaScript Iteration Statement</title> </head> <body> <h1>for / in 문</h1> <script> var obj = { name : "이순신", age : 20 }; for (var i in obj) { document.write(i + "<br>"); } </script> </body> </html>