• Zacryon@feddit.org
      link
      fedilink
      arrow-up
      5
      ·
      4 months ago

      I’d advise to always look into the corresponding documentation before using something from any library.

      • pinball_wizard@lemmy.zip
        link
        fedilink
        arrow-up
        3
        ·
        4 months ago

        But I’m too busy being confused by the behaviors of libraries I previously didn’t read the documentation for, to read the documentation for every new library I adopt.

        (This is sarcasm…mostly.)

    • jsomae@lemmy.ml
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      edit-2
      4 months ago

      Okay but this documentation is obviously wrong from the first sentence

      The parseInt() function parses a string argument and returns an integer of the specified radix

      Integers don’t have radices. It should read:

      The parseInt() function parses a string argument representing an integer of the specified radix and returns that integer.

      Either way, I still don’t understand the behaviour in the image. nvm, thanks m_f@discuss.online