var Person = {
firstName: 'Joe',
midName: 'Alan',
lastName: 'Dokes',
age: '35',
getFirstName: function() {
return this.firstName;
},
setFirstName: function(n) {
this.firstName = n;
},
getFullName: function() {
return this.firstName + ' ' +
this.midName + ' ' +
this.lastName;
}
}
<script>
document.getElementById('info').innerHTML =
Person.getFullName();
</script>