The most viewed posts

Registry Reviver

Web Development Services

How to clean up Windows Computer

About Desktop Icons in Windows Computer

Contact Me

Driver Booster

How to make a computer secure and run faster

Myanmar font and keyboard for Windows

CCleaner

Advanced System Care

The most viewed items

Dell Inspiron 5559

Desktop Hard Disk

Laptop RAM

HP ProBook 430

SONY Playstation Portable

External Hard Disk

Laptop

ZilaStar ICT Dec 06 2021, 19:52:03
Category : JavaScript Tutorials

Looping Array Element (JS Arrays)

<!DOCTYPE html>
<html>
<head>
<title>JavaScript Code Testing</title>
</head>
<body>
<p id = "demo"></p>
<script>
var cities, clen, text, i;
cities = ["Yangon", "Mandalay", "Naypyidaw", "Meikhtila"];
clen = cities.length;
text = "<ul>";
for(i=0; i<clen; i++){
text += "<li>" + cities[i] + "</li>";
}
text += "</ul>";
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>

  • Comments:

    No comment to show.

    To Contact
    Available Services
    Terms and Conditions