This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Person = function(firstAndLast) { | |
var full_arr = firstAndLast.split(' '); | |
var firstName = full_arr[0]; | |
var lastName = full_arr[0]; | |
var fullName = firstName + ' ' + lastName; | |
// now build the methods | |
function getFirstName() { | |
return firstName; | |
} |