From the course: JavaScript Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Practice: Pass values between functions

Practice: Pass values between functions - JavaScript Tutorial

From the course: JavaScript Essential Training

Practice: Pass values between functions

- Passing data to and returning data from functions changes a function from a basic, single purpose tool to an entire factory for data manipulation. In this practice assignment, you'll get to play with passing data back and forth between functions to create more efficient and reusable code. This is sort of a lead-up to how we work with components in JavaScript frameworks. So getting your mind on this track here and now will help you in the future as you continue on your learning journey. Here's what I want you to do. Writing markup for images quickly becomes clunky, especially if you wrap your images in a figure tag and add a figcaption or you use responsive images markup. In the practice files, you'll find a basic html page with a main container. Using everything you've learned so far, I want you to create two functions, one dependent on the other, to output some data from a custom object. The object is already…

Contents