The most viewed items
<!DOCTYPE html>
<html>
<head>
<title>JavaScript Code Testing</title>
</head>
<body>
<p id = "demo">forEach Loop</p>
<script>
var cities, text;
cities = ["Yangon", "Mandalay", "Naypyidaw", "Meikhtila"];
text = "<ul>";
cities.forEach(jsFunction);
text+= "</ul>";
function jsFunction(value){
text += "<li>" + value + "</li>";
}
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>
No comment to show.