Echo JS 0.11.0

<~>

tracker1 1938 days ago. link 2 points
One piece not covered is bitwise shift, which is useful for setting flags in a clear way, for example.

    const LIST_FRACTION = 1 << 0; // (001)
    const LIST_UNIQUE = 1 << 1;   // (010)
    const LIST_SORTED = 1 << 2;   // (100)

Beyond that, you don't need to check against the flag, since a match will be non-zero (truthy)

    if (flag & LIST_UNIQUE) {}