Skip to content

Commit a5ec300

Browse files
authored
Add files via upload
1 parent 2df8a71 commit a5ec300

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

Example/Array/Array.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data = ['java','c++','python','html','css']
2+
document.write("<br>",data)
3+
document.write("<br>Item 1 : "+data[1])

Example/Array/index.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Document</title>
7+
<!-- <script src="Array.js"></script> -->
8+
<script>
9+
function printfood(){
10+
food = ['samosa','kachori','fafda','jalebi','dhokla','vada pav']
11+
12+
for(i = 0 ; i < food.length; i++ ){
13+
14+
document.getElementById("box").innerHTML += "<li>"+food[i]+"</li>";
15+
}
16+
17+
}
18+
</script>
19+
</head>
20+
<body>
21+
<button onclick="printfood()">Click To Print</button>
22+
<ul id="box">
23+
24+
</ul>
25+
</body>
26+
</html>
27+
<style>
28+
li{
29+
height: 35px;
30+
width: 120px;
31+
background-color: aqua;
32+
border: solid 1px brown;
33+
border-radius: 25px;
34+
text-align: center;
35+
margin: 10px;
36+
padding-top: 10px;
37+
list-style: none;
38+
}
39+
</style>

0 commit comments

Comments
 (0)