Last active
November 7, 2017 12:44
-
-
Save me-shaon/e78cb61e0189ff62eae0360170deb294 to your computer and use it in GitHub Desktop.
Javascript Object 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This is known as constructor function or kind of a template for objects | |
function person(first, last, age) { | |
this.firstName = first; | |
this.lastName = last; | |
this.age = age; | |
} | |
var newPerson = new person("John", "Doe", 50); //this is a an object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment