This is a potential answer to the exercise: Find an object in an array.
- Try validating the user input before testing:
inputValue
value missing: "Please enter a Character Class";
- The
return
statement in theif
/else
blocks is redundant. Refactor this code to use the least code possible.