+ 3
Questions about .reduce() and .sort() method in javascript and one challenge
Can I ask what are the uses of these two methods? Can someone propose some examples so that me as well as the others can refer on? Here is a challenge : Given an array of time , example: var durations = ["12:38", "6:36", "9:03", "8:34", "5:02", "6:54", "13:22", "4:41", "8:36", "21:58", "3:06", "10:46", "10:13", "12:54", "14:00", "11:03", "16:03", "10:52", "24:53", "10:03", "11:49", "15:47", "3:19", "2:06", "5:47", "1:03", "5:29", "5:47", "26:39"] take the sum of hours and minutes and show them in the f
5 Antworten
+ 3
For usage of sort and reduce methods together, please check out this challenge:
https://code.sololearn.com/WZCL8wTUyKSO/?ref=app
+ 5
https://code.sololearn.com/WbTSSS96Xiiw/?ref=app
Just accept only challenge
+I added round sec bc 24:53 is not existed in my dialog clock
+ 4
I use reduce, but not use sort method.
https://code.sololearn.com/WvcCecQ7BC3T/?ref=app
+ 3
thanks bro!!
+ 3
have fun guys idk the answer