Lab 12 - Conditionals

Challenge

In this lab, we are getting familiar with conditionals.

Problems

With the actual lab itself, I didn't have too many problems, but I wanted to do something extra and so I tried to output a color palette (since I'm sorting names into colors rather than houses). It was really difficult trying to make it work and format correctly. I used <div> and colored backgrounds to make it work but I'm not sure that's the most effective way. I saw that there is a <canvas> tag but I couldn't get it to work with that. I could only get it to format correctly when the website is in full screen but when you minimize it, the size of the window messes up the formatting.

Results

I have a Lab 12 index.html file that is styled with CSS and I have a JavaScript file that takes user input and then uses conditionals to sort that name into different color groups.

Script Output

***Make sure you click submit, not Enter!***

Here is my JavaScript file.