function Employer(company, url, entryDate) { | |
this.company = company; | |
this.url = url; | |
this.entryDate = entryDate; | |
this.getInfo = function () { | |
var date = this.entryDate.toLocaleDateString(); | |
return 'Michael is happy to start at ' + this.company + ' (' + this. url + ') on ' + date; | |
}; | |
} | |
var micromata = new Employer('Micromata GmbH', 'http://www.micromata.de', new Date(2014,03,01)); | |
console.info(micromata.getInfo()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
hilarious :D