Matthew pfp
Matthew
@matthew
TIL you can just do .filter(Boolean) instead of .filter((prop) => !!prop)
6 replies
1 recast
20 reactions

Juuso pfp
Juuso
@juuso
History tid-bit: APL from the 1960's started using arrays made of 0 and 1 as a "view array". When you overlay an array with a view array on top of each other, the resulting array only has elements where the view array has an element 1 at a given index. This is denoted simply as /. So, 0 1 1 0 / 1 2 3 4 outputs 2 3.
0 reply
0 recast
0 reaction