3 ms·
Does that only cull nulls, or also zeroes, falses and empty strings?
by sjamaan 4y ago
Does that only cull nulls, or also zeroes, falses and empty strings?
- sergiosgc 4y agoAnything "falsy" -- any item that, when cast to boolean results in false. So, also zeroes, falses and empty strings.
- sjamaan 4y agoThat was my point - OP said it "culls nulls", and the pitfall is that kind of thinking - if you think of it as removing nulls and you're not mindful, you might be deleting things from the list you don't want to be deleting.