• @garretble
    link
    English
    16
    edit-2
    9 months ago

    For me it’s: remember the last user on this device!

    If I open Hulu and I have ONE account, why are you making me select the ONE account? I have to select it every time. They should know.

    if(accounts.length === 1) {
        setAccount(accounts[0]);
    }
    

    There. I fixed it. Give me a job.

    • yeehaw
      link
      fedilink
      English
      39 months ago

      Triple equals? I’m no expert programmer but I’ve never seen that before.

      • @[email protected]
        link
        fedilink
        English
        79 months ago

        Double equals means equals, triple equals means strict equality including type.

        Prevents a Boolean true being evaluated to 1 for example

      • Kevin
        link
        fedilink
        English
        39 months ago

        Specific to JS, due to the double equals being type oblivious