Passing Objects

You can pass an object to a function in the function argument and have access to all of the object’s properties within the function…

function changeName( animal  ) {
    animal.name = “Louie”;
} 
console.log( animal.name ); // Outputs “Louie” 

Happy Coding!

Clay Hess

More To Explore

Share This Post

small_c_popup.png

Need help?

Let's have a chat...


Login

Jump Back In!

Here at Webolution Designs, we love to learn. This includes sharing things we have learned with you. 

Register

Begin Your Learning Journey Today!

Come back inside to continue your learning journey.