Skip to content

Instantly share code, notes, and snippets.

@JitendraZaa
Created March 10, 2018 18:52
Show Gist options
  • Select an option

  • Save JitendraZaa/a504a06bec6cdec98750fb74d3e851ae to your computer and use it in GitHub Desktop.

Select an option

Save JitendraZaa/a504a06bec6cdec98750fb74d3e851ae to your computer and use it in GitHub Desktop.
Sample Javascript file for Jasmine Test Framework
function Person(first,last,age,eyecolor){
this.firstName = first;
this.lastName = last;
this.age = age;
this.eyeColor = eyecolor;
}
Person.prototype.name = function(){
return this.firstName+ " "+this.lastName;
};
Person.prototype.changeAge = function(newAge){
this.age = newAge;
};
Person.prototype.getAge = function(){
return this.age ;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment