Skip to content

Instantly share code, notes, and snippets.

@AkashRajvanshi
Created November 2, 2019 13:29
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/4aeff8490581112f14acc0b4e64a8e7a to your computer and use it in GitHub Desktop.
Save AkashRajvanshi/4aeff8490581112f14acc0b4e64a8e7a to your computer and use it in GitHub Desktop.
const user = {
firstName: 'Akash',
lastName: 'Rajvanshi',
fullname: function () { //method
return `${this.firstName} ${this.lastName}`
}
};
console.log(user.fullname()) //Akash Rajvanshi
console.log(user.firstName) //Akash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment