-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcountry.html
More file actions
41 lines (37 loc) · 1.06 KB
/
country.html
File metadata and controls
41 lines (37 loc) · 1.06 KB
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
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<title>
js
</title>
</head>
<body>
<h1>
second javascript file its an assignment
</h1>
<p>To display the country name whose population is less than 2000</p>
<script>
let country=[
{ name:"India",
capital:"Delhi",
population:5000
},
{
name:"canada",
capital:"toronto",
population:1000
},
{
name:"america",
capital:"new jersey",
population:1500
}
]
for(let i=0;i<=2;i++)
if(country[i].population<2000)
{
console.log(country[i].name)
}
</script>
</body>
</html>