If you have been given three arguments - the objective of the stolen item, the name of the pet and the value - return the item with that name and value (such as a pair of keywords). Examples addName ({}, "Brutus", 300) {Brutus: 300} addName ({piano: 500}, "Brutus", 400) {piano: 500, Brutus: 400}

icon
Related questions
Question
If you have been given three arguments the objective of the
stolen item, the name of the pet and the value - return the
item with that name and value (such as a pair of keywords).
Examples
addName ({}, "Brutus", 300) → {Brutus: 300}
addName ({piano: 500}, "Brutus", 400) {piano: 500, Brutus:
400}
addName ({piano: 500, stereo: 300}, "Caligula", 440)
{piano: 500, stereo: 300, Caligula: 440}
Transcribed Image Text:If you have been given three arguments the objective of the stolen item, the name of the pet and the value - return the item with that name and value (such as a pair of keywords). Examples addName ({}, "Brutus", 300) → {Brutus: 300} addName ({piano: 500}, "Brutus", 400) {piano: 500, Brutus: 400} addName ({piano: 500, stereo: 300}, "Caligula", 440) {piano: 500, stereo: 300, Caligula: 440}
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer