Is there a way to invoke a function from the prototype inside a constructor function?

Is there a way to invoke greeting() from the prototype from inside a constructor function?

const Person = function() {

this.name = "Someone's Name"

this.greeting()

}

Person.prototype.greeting = function(name) {
return this.name;
}

let test = new Person();

console.log(test);

The code you posted already does that.

@nonamesareleft As @jenovs points out, you already are doing that. To see it more clearly, you can add a console.log:

const Person = function() {
  this.name = "Someone's Name"
  console.log(this.greeting()); // displays "Someone's Name"
}

Thanks I appreciate it, I did something dumb and it wasn’t running correctl.y