Day 17 – Bobby pin quiz

So I wanted to do a simple quiz, again inspired by JD. The BF again came up with a super silly idea about what bobby pin you are… Yeah he’s weird, and I like it!

So here is my silly quiz with questions that make absolutely no sense in reference to bobby pins.

I learned:

  • Getting better at using forms and the properties within the form element. This time I used the value property to give each answer a number that will be added to the sum and thereby determining which result the user will get.
  • Again practising the show/hide function. I really think it’s a simple way to avoid having to do several pages and linking between them.
  • Still trying to get used to the fact that a string with a number in it is not the same as a number. A string with a number cannot be added to another number (in the math sense), but a real number (not a string) can. So the value in the forms are a string, so I needed to change it to a real number. For that I used the parseInt function (that the BF taught me).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s