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, 22.06.2019 17:20
[a] create a class called “cycle” which has two instance integer variables as properties, “numberofwheels” and “weight.” create a constructor with two parameters, using the same variable names in the parameter list. assign each variable to numberofwheels” and “weight” respectively. write a separate application to test the class and display its properties. note: do not change the names of the instance variables or the variables listed in the constructor’s parameter list. [b] edit your class cycle by adding a default constructor which will assign the default values of 100 to represent the numberofwheels, and 1000 to represent the weight, by invoking a call to the other constructor. modify your application created in [a] to test the class.
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
List 3 items that were on kens resume that should have been excluded
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
What software programs are used to to create professional publication? a.) graphics programs b.) word processors c.) page layout programs d.) spreadsheet programs
Answers: 2
question
Computers and Technology, 23.06.2019 21:40
language consists of basic components, and they are called a. 3; mental images, concepts, and speech b. 2; language acquisition and linguistic relativity c. 3; heuristics, algorithms, and analogies d. 4; phonemes, morphemes, syntax, and semantics e. 2; words and grammar
Answers: 3
You know the right answer?
Javascript Question;INSTRUCTIONSModify this function to take in an object as a parameter. The object...
Questions
question
Mathematics, 05.08.2020 14:01
question
English, 05.08.2020 14:01
question
Mathematics, 05.08.2020 14:01