Day 4

aronson(25)
Published in
#coding
Words
150
Reading
1 min
Listen
Play
9y

January 18th 2018

Hi there!

The project for JavaScript was simple was visually but pretty important otherwise. I learned about the .reduce() method to add up the total time of different list elements, which stood for how long a list of videos lasted. What is the total length in hours, minutes and seconds of a list of videos.

. reduce((total, vidseconds) => total + vidseconds);

But in order to get the seconds divided we used the .split() method as “.split(“:”) and then mapped the whole thing. We needed to first ttake timeNodes and mapped from an array of list items into an array of strings and then call this function against every item in that array.

At the Web Developer Bootcamp I did an easy name and age prompting exercise as well as an age calculator. Pretty easy stuff, but it is cool. Off to learning Basic Control Flow next.