UNPKG

ds-algo-study

Version:

Just experimenting with publishing a package

20 lines (14 loc) 593 B
/*********************************************************************** Write a function `getFullName(person)` that takes in an person object and returns a string containing their full name. Examples: let p1 = {firstName: 'John', lastName: 'Doe'}; getFullName(p1); // => 'John Doe' let p2 = {firstName: 'Charlie', lastName: 'Brown', age: 9}; getFullName(p2); // => 'Charlie Brown' ***********************************************************************/ function getFullName(person) { let name = person.firstName + " " + person.lastName; return name; } module.exports = getFullName;