FAQ: Variables - Putting it All Together

This community-built FAQ covers the “Putting it All Together” exercise from the lesson “Variables”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn How To Code

FAQs on the exercise Putting it All Together

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!


I am unable to move on from this lesson without getting the solution from the help menu! It seems simple so I don’t know if I am missing something or if it is just a bug.


Not able to reproduce this problem. Lesson worked fine for me and let me move on to completion. What browser are you using?

1 Like

I am using Firefox. I reopened it, copied the solution, and pasted it. It wouldn’t allow the pasted solution to proceed either. I think it must be a bug on my end somewhere.

1 Like

Where is the HTML to go with this JS? I thought they both would be accessible. It would to helpful to see how it all works together.

That is not the objective of this module. It’s more about concepts than actual code. You might glean a lot from the HTML and CSS but it would be ahead of the learning curve and you would have more questions than answers, which questions if they do not get answered force you into presumptions.

Bottom line, don’t try to get ahead of the curve, just yet.

1 Like

Yes, I agree. I’m inquisitive by nature, wanting to know all things :joy:. Thanks. :slightly_smiling_face:


I’m having the same problem as govtchris had, even did the copy paste thing too and it wouldn’t let me pass either. I had to use the help to move on.

1 Like

I notice in these early examples you’re not declaring variables with var. I know I’m getting way ahead of myself – but is this not the proper convention anymore?

Declaring variables is less convention and more intrinsic requirement. In the global namespace a declaration is rather moot, though. For small exercises most of the activity takes place there. Declared or not, variables are all global, in the var sense.

In ES5, var gave variables function scope which prevented them from leaking out into the global namespace. In ES6, let and const give variables block scope which prevents them from leaking into their local scope.

This is vitally important since now it means that even in the global namespace, variables can exist in their own block scope and not collide with global variables. It has relegated var to a legacy keyword that might even one day be deprecated.