Constructors

From rbachwiki
Revision as of 17:08, 6 November 2016 by Bacchas (talk | contribs)
Jump to navigation Jump to search

Function Constructor

var Person = function(name, yearOfBirth, job){
    this.name = name;
    this.yearOfBirth = yearOfBirth;
    this.job = job;
}


var john = new Person('john', 1967, 'teacher');

Back To Top- Home - Category