Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Kennedy Malonga
Kennedy Malonga
22,856 Points

// Write a function that takes an object with two properties as argument // It should return the value of the property

// Write a function that takes an object with two properties as argument // It should eturn the value of the property with key country function myFunction ( obj ) { this.obj = 'Japan' + 'Sweden'; return myFunction; }

1 Answer

Steven Parker
Steven Parker
231,261 Points

Here's a couple if hints:

  • the instructions don't ask you to modify the object (don't assign anything to it)
  • instead of returning the function itself, return the property of the object named "country"