Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.