JS Assignment 12: Methods, Loops and the 'this' keyword
HannahB593 (1)

I understand and got correct the first exercise but am confused about exercise two... this is what I have:

function exerciseTwo(userObj){
userObj.greeting = function(){
return 'Hi, my name is' + this.name;
return userObj;

I keep getting the error: "Should add greeting method to userObject object."

You are viewing a single comment. View All
HannahB593 (1)

This is the original assignment. @Vandesm14