JavaScript Program to Create an Object and display its properties using loop

Write a JavaScript program to create an object and display its properties using loop.

Source Code
    <title> loop demo</title>
<h3>Programming languages are</h3>
<script type="text/javascript">
    // creating an Object 
    var languages = { first : "C", second : "Java",  
        third : "Python", fourth : "PHP",  
        fifth : "JavaScript" 

    // iterate through every property of the 
    // object languages and print all of them 
    // using loops 
    for (itr in languages)  
        document.write(languages[itr] + "<br >"); 

"Coding Hub - Learn to code" app now available on Google Play Store