Pricefield | Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@[email protected] to Programmer [email protected] •
edit-2
2 years ago

JavaScript always know my truest of desires

lemmy.world

message-square
38
fedilink
427

JavaScript always know my truest of desires

lemmy.world

@[email protected] to Programmer [email protected] •
edit-2
2 years ago
message-square
38
fedilink

  • @[email protected]
    link
    fedilink
    -4•2 years ago

    I don’t think JS works that way

    • @[email protected]
      link
      fedilink
      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.

      • @[email protected]
        link
        fedilink
        16•2 years ago

        Fuck JS is stupid.

        Source: use JS regularly

    • Rikudou_Sage
      link
      fedilink
      English
      32•2 years ago

      It does.

Programmer [email protected]

[email protected]
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
  • 151 users / day
  • 377 users / week
  • 1.12K users / month
  • 4.45K users / 6 months
  • 3 subscribers
  • 1.59K Posts
  • 56.4K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @[email protected]
  • Pierre-Yves Lapersonne
  • UI: 0.18.4
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org