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 JavaScript Foundations Strings Methods

please help understanding task (Methods pt 2 Challenge)

I do not understand what they mean by update the variable.

1 Answer

Erik McClintock
Erik McClintock
45,783 Points

Brandon,

You can think of a variable as simply a container in which to store information, like tupperware for left over food. If you want to update the contents of any given container, you simply change what's inside of it. If you have tupperware with chicken, but tomorrow you want salad, you replace the chicken with the salad, i.e. you "update" the contents of the container. In this particular code challenge, they are asking you to update what is inside of the variable called "quickLength" to be the length of the string that is contained in the variable "quick":

var quickLength = quick.length;

Hope this helps make some more sense of things!

Erik