WEB.JS/05.배열_JS
chapter04 : 배열
GAWON
2023. 5. 19. 17:38
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
var fruits = ["apple", "banana", "orange", "kiwi", "mango"];
var msg = "<ul type='square'>";
for (var i = 0; i < fruits.length; i++) {
msg += "<li>" + fruits[i] + "</li>";
}
msg += "</ul>";
document.write("<h3>" + msg + "</h3>");
</script>
</head>
<body>
</body>
</html>