-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforin.html
More file actions
37 lines (32 loc) · 842 Bytes
/
Copy pathforin.html
File metadata and controls
37 lines (32 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html>
<head>
<title>forloop example</title>
</head>
<body>
<!--
<script>
var continents = ["America", "India", "Australia", "Singapore", "UnitedKingdom"];
var response, count = 0,
index;
for (index in continents) {
response = confirm("Have you been to this Country " + continents[index]);
if (response) count++;
}
alert("you have been to" + count + "Continents ");
</script>
-->
<script>
var response, count = 0;
// this is an object called onePerson
var onePerson = {
initials: "DR",
age: 40,
job: "Professor"
};
for (var property in onePerson) {
alert(property + "=" + onePerson[property]);
}
</script>
</body>
</html>