Please note, this is a STATIC archive of website www.tutorialrepublic.com from September 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Iterate Over an Array Using For Loop</title> </head> <body> <script> // An object with some properties var person = {"name": "Clark", "surname": "Kent", "age": "36"}; // Loop through all the properties in the object for(var prop in person) { document.write("<p>" + prop + " = " + person[prop] + "</p>"); } </script> </body> </html>