Skip to content

Commit 647dc2d

Browse files
authored
Create index.html
1 parent 017baba commit 647dc2d

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>JavaScript Object Example</title>
5+
<script type="text/javascript">
6+
function phones(name,model,color)
7+
{
8+
this.name=name;
9+
this.model=model;
10+
this.color=color;
11+
}
12+
var iPhone=new phones("iPhone","13 pro max","Gold");
13+
var Android=new phones("Android","Samsung Galaxy S10","Indigo");
14+
</script>
15+
</head>
16+
<body>
17+
<script type="text/javascript">
18+
document.write(iPhone.model);
19+
</script>
20+
</body>
21+
</html>

0 commit comments

Comments
 (0)