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
Rustam Karimov
4,667 PointsI can't find some course about return(Javascript).
maybe i skipped:) can you help to find it?
2 Answers
tobiaskrause
9,160 PointsNot sure but this sound like what you need https://teamtreehouse.com/library/javascript-foundations/functions/return-values
jason chan
31,009 Pointssince everything in javascript is an object.
Return just returns the function as an object.
tobiaskrause
9,160 PointsWell primitives are not really objects. They are immutable...but JS creates wrappers objects for these primitives with methods and properties
But yes JS treats Functions as objects. Also we should mention that JS objects are not the same as objects in other oop languages