subject

Javascript Question;INSTRUCTIONSModify this function to take in an object as a parameter. The object will represent a person and have a firstName property and a lastName property. Return the person’s full name, separated by a space. Example:getFullName({ firstName: 'Jon', lastName: 'Smith' });// -> 'Jon Smith'This is what I got so far;function getFullName(name1, name2) {let person = {firstName: "John Smith",lastName: "Sarah Smith",};return `${person. firstName}`;return `${person. lastName}`;}***My problem is that it only return John Smith, and not Sarah. Anyone has a suggestion on what I should add? Thank you in advance!

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 18:30
How often does colleges update the cost of attendance on their website? . a)every two years b) every four years c) every year d) every semester
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
question
Computers and Technology, 23.06.2019 21:00
Will this setup result in what kathy wants to print?
Answers: 2
question
Computers and Technology, 24.06.2019 02:30
Assume a class window with accessor method getwidth that accepts no parameters and returns an integer. assume further an array of 3 window elements named winarr, has been declared and initialized. write a sequence of statements that prints out the width of the widest window in the array.
Answers: 2
You know the right answer?
Javascript Question;INSTRUCTIONSModify this function to take in an object as a parameter. The object...
Questions
question
Physics, 30.06.2019 15:30
question
Mathematics, 30.06.2019 15:30
question
Mathematics, 30.06.2019 15:30
Questions on the website: 13722361