/broken-greetings

Javascript kata to correct a greet function.

Primary LanguageJavaScript

JAVASCRIPT KATA : Broken Greetings !

Description:

Correct this code, so that the greet function returns the expected value.

function Person(name){
  this.name = name;
}

Person.prototype.greet = function(otherName){
  return "Hi " + otherName + ", my name is " + name;
}

Solution : solution.js

Source : codewars