Skip to content

Instantly share code, notes, and snippets.

@AkashRajvanshi
Last active September 26, 2019 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AkashRajvanshi/8459e545b2ab22b57ec381caeeeba2ba to your computer and use it in GitHub Desktop.
Save AkashRajvanshi/8459e545b2ab22b57ec381caeeeba2ba to your computer and use it in GitHub Desktop.
function Person(firstName, lastName) {
this.first_name = firstName
this.last_name = lastName
this.displayName = function () {
console.log(`Name: ${this.first_name} ${this.last_name}`) // Name: Akash Rajvanshi
}
}
let person = new Person("Akash", "Rajvanshi")
person.displayName()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment