Lab #31 Adding Up Time With Reduce
Lab #31, titled "Adding Up Time With Reduce", was a lab where there were a whole bunch of video times given to me and I had to add them up using JavaScript. The website doesn't really show much, because most of it is on the console. If you inspect element my webpage, you can see how long each said video is, and in console, the total time for all the videos together is displayed.
4:58:58 is the time added up for all of the 'videos' on my webpage. I added them all using JavaScript functions that used jQuery to select all of the time nodes of the videos to convert them into seconds, minutes and hours. This then made the three different numbers that display in the console, which is the total amount of time all the videos are together in hour:minute:seconds format.
Web designers can use these functions to estimate watch time for multiple videos on a website. For example, you can own a streaming website and calculated watch time based on the playlists that the person is watching. From that data, you can run how long the video will be and display it for the person so they can know if they have enough time to watch it or not.
4:58:58 is the time added up for all of the 'videos' on my webpage. I added them all using JavaScript functions that used jQuery to select all of the time nodes of the videos to convert them into seconds, minutes and hours. This then made the three different numbers that display in the console, which is the total amount of time all the videos are together in hour:minute:seconds format.
Web designers can use these functions to estimate watch time for multiple videos on a website. For example, you can own a streaming website and calculated watch time based on the playlists that the person is watching. From that data, you can run how long the video will be and display it for the person so they can know if they have enough time to watch it or not.

Comments
Post a Comment