Lab 31 Reflection Journal
This lab is something I might use myself as I spend most of my free time watching videos on YouTube and this can come in handy. So for this lab we needed to create a list in which there would be videos each with a different time and the total amount of time for all videos will be displayed on the console log. To do this the data-time attribute was added to the li tags and then using the querySelectorAll code all the data-time attributes were selected each containing a different amount of time for each individual video and it was placed inside a constant. Then after doing this separate constant were made for hours and minutes using this the total amount of hours and minutes would be calculated and then display upon the console log.
The code gained from the lab will most likely come in handy in future work whether it be towards ones own portfolio or a personal project the code can be used to make calculations on the total amount of data which makes things easier on the coder or user depending on who it was intended for.
Comments
Post a Comment