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.

Start by remixing this project. Test out the buttons to see how they work - each of them has an issue. Fix all of the issues in the functions for each of the buttons. All changes should take place in the script.js file.

1. Clothing Check

  • Button name: Clothing Check
  • Function name: clothing
  • Issue: Says to wear a T-shirt if the temperature is below 60 degrees

2. Background Change

  • Button name: Background Change
  • Function name: backgroundChange
  • Issue: Changes the background to the incorrect colors

3. Evidence of Aliens

  • Button name: Evidence of Extraterrestrial Life
  • Function name: evidence
  • Issue: Shows the picture when any incorrect password is entered

4. School Check

  • Button name: School Check
  • Function name: schoolCheck
  • Issue: Says the wrong school level based on ages provided

results matching ""

    No results matching ""