FAQ: Code Challenges: Intermediate JavaScript - Fix The Broken Code!


This community-built FAQ covers the “Fix The Broken Code!” exercise from the lesson “Code Challenges: Intermediate JavaScript”.

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

Web Development

FAQs on the exercise Fix The Broken Code!

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’m confused with instructions regarding this exercise… what exactly are we suppose to do? what’s problem we are asked to solve? wording is terrible.


I can see what’s wrong but still don’t understand what the function should do.

the smallest power of two which is greater than the current element

What does this mean? So 8 is the smallest power of 2 which is greater than the current element 5? Please explain.


The wording is fine… Try identifying what you don’t understand, for example, what is a power of two, which such values exist, and which of them is the smallest one that is greater than some other value, and which value is that other value?


Thanks guys, i figured out but just wan’t sure what was being asked…