• Victoria@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 days ago

      Indeed, the unary plus operator tries to convert whatever is after it to a number if it isn’t already. Since ‘a’ is not a valid number, it returns NaN (not a number)