logo
logo

Default to New York

Default to New York

Create a function called
getAddress
that takes in an object containing
street
,
city
,
state
, and
zip
fields. Destructure the object to get only the
city
and
country
fields with default values of
New York
and
USA
, respectively. Return an object with the two fields.

Console
Submit
Solution
00:00