Skip to content

Instantly share code, notes, and snippets.

@conspirator
Created October 8, 2010 04:47
Show Gist options
  • Save conspirator/616375 to your computer and use it in GitHub Desktop.
Save conspirator/616375 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
Person.prototype.setPerson = function(x){
this.firstName = x.firstName;
this.lastName = x.lastName;
this.job = x.job;
}
function init() {
var wife = new Person();
wife.setPerson({
firstName: "Joan",
lastName: "Leach",
job: "Teacher"
});
wife.writePerson(3);
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment