Chapter 7. Object arguments: functions working with objects

This chapter covers

  • Using objects as arguments
  • Accessing object properties from within a function
  • Adding new object properties from within a function
  • Returning objects from functions
  • Setting functions as properties of objects

This is the last of the run of four chapters introducing functions. By now, you know about using functions to execute code on demand and passing information to and from functions using parameters, arguments, and the return keyword. You’ve also seen how to use objects to collect values together as named properties. Well, it’s time to combine functions and objects to turbocharge productivity, efficiency, and readability.

Remember the first-aid kit from ...

Get Get Programming with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.