Ask coding questions

← Back to all posts
Js Prototype exercise
jimenez7 (0)

Hello everyone, may i ask for some guidence regarding the exercise listed below.

malvoliothegood (718)

I don't see the point of this.greeting = greeting as greeting is not defined and initialised. The following code should be sufficient. Also you do not need to return UserClass.

UserClass.prototype.greeting = function() {
  return 'Hello, it is nice to see you!';