Today I Learned - Rocky Kev

Tagged “booleans”

  1. TIL Double Exclamation shorthand for booleans

    JavaScript (and TypeScript) lets you convert a non-Boolean value to Boolean using the double exclamation shorthand. '!!'

  2. TIL a easier way to check for multiple OR statements

    Essentially, it's turning a multiple conditional into a array, then array to see if it matches.

  3. TIL of returning true/false directly

    return true or false directly bruh

  4. TIL Casting values to JS booleans

    use the !! to casting values to JS

See all tags.