Slackbot
04/13/2023, 11:31 AMFabian Iwand
04/13/2023, 11:40 AMAdebiyi Adedotun
04/13/2023, 11:43 AMFabian Iwand
04/13/2023, 11:47 AMAdebiyi Adedotun
04/13/2023, 11:52 AM[0, 0, 1, 1, 1]
is not sufficient in itself?Fabian Iwand
04/13/2023, 12:20 PMAdebiyi Adedotun
04/13/2023, 3:32 PMMichael Cooper
04/13/2023, 5:00 PMd3.cumsum
adds numbers up and keeps track of the running total. When you add things that aren't numbers, JS does it's best. true + false
is equal to 1, and true + true
is equal to 2. JS implicitly converts things it tries to add to numbers (sometimes...), and when it does that with true and false it gets 1 and 0, respectivelyAdebiyi Adedotun
04/14/2023, 1:46 PM