programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
kuneho@lemmy.world to Programmer Humor ·
edit-2
2 years ago

JavaScript always know my truest of desires

lemmy.world

message-square
35
link
fedilink
438

JavaScript always know my truest of desires

lemmy.world

kuneho@lemmy.world to Programmer Humor ·
edit-2
2 years ago
message-square
35
link
fedilink

  • heartlessevil@lemmy.one
    link
    fedilink
    arrow-up
    2
    arrow-down
    6
    ·
    2 years ago

    I don’t think JS works that way

    • Rikudou_Sage@lemmings.world
      link
      fedilink
      English
      arrow-up
      32
      ·
      2 years ago

      It does.

    • Quasari
      link
      fedilink
      arrow-up
      21
      ·
      edit-2
      2 years ago

      Array.prototype.sort if no callback is passed to it will coerce non-undefined elements to strings when sorting. It does do that.

      To sort numbers passing a function like (a, b) => a - b is good enough.

      • stratoscaster@lemmy.zip
        link
        fedilink
        arrow-up
        17
        arrow-down
        1
        ·
        2 years ago

        Fuck JS is stupid.

        Source: use JS regularly

Programmer Humor

programmer_humor

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 958 users / day
  • 4.69K users / week
  • 9.15K users / month
  • 17.9K users / 6 months
  • 2.39K local subscribers
  • 23.2K subscribers
  • 1.37K Posts
  • 51.6K Comments
  • Modlog
  • mods:
  • adr1an
  • Feyter
  • BurningTurtle
  • Pierre-Yves Lapersonne
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org