FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
examples/JavaScript/objects.html at master · sromanowski12/examples · GitHub
sromanowski12
/
examples
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
examples
/
JavaScript
/
objects.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (29 loc) · 883 Bytes
Breadcrumbs
examples
/
JavaScript
/
objects.html
Copy path
File metadata and controls
33 lines (29 loc) · 883 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<!DOCTYPE html
>
<
html
>
<
head
>
<
meta
charset
="
utf-8
"
>
<
title
>
Object-oriented JavaScript examples
</
title
>
</
head
>
<
body
>
<
p
>
Requires commands in JavaScript browser console
</
p
>
</
body
>
<
script
>
function
Person
(
first
,
last
,
age
,
gender
,
interests
)
{
this
.
name
=
{
'first'
:
first
,
'last'
:
last
}
;
this
.
age
=
age
;
this
.
gender
=
gender
;
this
.
interests
=
interests
;
this
.
bio
=
function
(
)
{
alert
(
this
.
name
.
first
+
' '
+
this
.
name
.
last
+
' is '
+
this
.
age
+
' years old. He likes '
+
this
.
interests
[
0
]
+
' and '
+
this
.
interests
[
1
]
+
'.'
)
;
}
;
this
.
greeting
=
function
(
)
{
alert
(
'Hi! I\'m '
+
this
.
name
.
first
+
'.'
)
;
}
;
}
var
person1
=
new
Person
(
'Seth'
,
'Romanowski'
,
28
,
'male'
,
[
'computers'
,
'baseball'
]
)
;
</
script
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL