Plan and done for June-22-2017
What will I learn today?
- Dive into JS.
Done
-
Stuck a little with the yesterday's problem. The reason - can't add up only those remainder's groups which don't give a divider mutually - I've set an array of 'banned' remainders and try to use it inside
Array.prototype.reduce()but it seems like it's not seen insidereduceloop.The solution for this was quite easy - I added to an array numbers and checked if an element is included with a string equivalent. Added plus sign before an element so it looked like
Arr.includes(+num)and everything started to work great.