Self-Paced Work: Conditional Debugging
One of the most important parts of programming is debugging - the process of finding and fixing errors in code. In this activity, practice debugging an existing program.
Click here to view the starter Repl project. Fork the project to begin.
Start by testing out the buttons to see how they work. You may notice that each of these buttons has an issue. This is a serious problem. You need to fix all these problems.
All changes should take place in the script.js file.
1. Clothing Check
This button should tell you what clothes to wear based on the temperature.
- Button name: Clothing Check
- Function name:
clothing
- Issue: Says to wear a T-shirt if the temperature is below 60 degrees
2. Background Change
This button should let you change the background color of the page.
- Button name: Background Change
- Function name:
backgroundChange
- Issue: Changes the background to the incorrect colors
3. Evidence of Aliens
This button should show you evidence of extra terrestrials ONLY IF the correct password is entered.
- Button name: Evidence of Extraterrestrial Life
- Function name:
evidence
- Issue: Shows the picture no matter what password is entered - this is very insecure!!!!
4. School Check
This button should tell you which type of school you should attend based on your age.
- Button name: School Check
- Function name:
schoolCheck
- Issue: Says the wrong school level based on ages provided