Day 23 – How far does it go?

Go to project: How far does it go?

I am back with another data-project (that’s what my BF calls them). This actually came up, because we bought a car in November last year, and it runs on diesel and has great gas economy. But we wanted to see just exactly HOW great it was. So we came up with this project, where we can put in the receipts we have saved since we bought it, and then let the program calculate everything for us!

This project taught me:

  • I reused some of the updateHTML() function from day 22. This project was a bit less complicated because there was no delete or done buttons, just adding to the array.
  • Normally I know that you use the .push() for pushing new things into an array, but today I learned that you can use .unshift() to push stuff into the BEGINNING of the array. Who knew?! Well, my BF obviously…
  • Used the .focus() for the first time, to make it easier to input the numbers on the top of the page. I know it’s a small feature, but I really like that.
  • Tried the “select” html element instead of the input, for inputting the months. It’s a dropdown menu, and I had no idea that it was THAT easy.
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s