Skip to content

Instantly share code, notes, and snippets.

@diegodelfin7
Created November 7, 2016 20:54
Show Gist options
  • Save diegodelfin7/aa14131382ab236403c7873764b97b21 to your computer and use it in GitHub Desktop.
Save diegodelfin7/aa14131382ab236403c7873764b97b21 to your computer and use it in GitHub Desktop.
var Student = (function () {
function Student(firstName, middleInitial, lastName) {
this.firstName = firstName;
this.middleInitial = middleInitial;
this.lastName = lastName;
this.fullName = firstName + " " + middleInitial + " " + lastName;
}
return Student;
}());
function greeter(person) {
return "Hello ," + person.firstName + " " + person.lastName;
}
var user = new Student("Jane", "M . ", "User");
document.body.innerHTML = greeter(user);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment