Lab 12: Conditionals

Challenges

Working with your partner, create a function that depends on conditionals.

Problems

For me, I'm crafting these exercises new this year, though I have taught JavaScript for many years. Trying to create exercises and code that build on previous things we've learned and experiment with new things and aren't too challenging for beginning programmers to complete. I liked this exercise because the Sorting Hat function makes me happy.

Results

I created a pretty straight forward conditional in my function, but realized after writing it, the repetitive structure probably means there is a more efficient way to write this. Probably using an object as key-value pairs will be simple, work really well, and be easy to maintain.

Welcome to Pigwarts

Prepare To Be Sorted Into Your House

Please enter your FULL name for sorting: