if statements

This was most likely the most valuable information I have learnt in this class. We need to create a if statement for the filter for our announcements. I’ve used if statements before with code in Arduino. But this code would only include one condition. So starting with what I know I created like 7 if statements with only one condition each. My friend looked over at my screen and told me how ineffective that was. So that’s when I got introduced to using || to break up conditions. The next problem that I faced with the if statement was doing multiple selection. Once you figure this out it seems so simple. When starting to program this, I thought that the variable would just hold both the selections and it would compare both by itself. This wasn’t true. What needed to be done is you need to tell the program which selection to compare to what. For example clubchoice[1] === post[i].category && genderchoice === post[i].gender || this is saying that the second clubchoice compare that to the category in the post. After getting this I felt so relieved because this was the last thing I need to complete for my program. Figuring this out created changes because there was no online resource so we had to work as a team with the knowledge that we had.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.