Content Warning

This website contains age-restricted materials including nudity and explicit depictions of sexual activity.

By entering, you affirm that you are at least 18 years of age or the age of majority in the jurisdiction you are accessing the website from and you consent to viewing sexually explicit content.

Lemmy NSFW
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 3 days ago

Which of these javascript expressions is false?

message-square
75
link
fedilink
492

Which of these javascript expressions is false?

cm0002@lemmy.world to Programmer Humor@programming.dev · 3 days ago
message-square
75
link
fedilink
  • jenesaisquoi@feddit.org
    link
    fedilink
    English
    arrow-up
    69
    ·
    2 days ago

    It’s C

    • JCpac@lemmy.today
      link
      fedilink
      English
      arrow-up
      108
      ·
      2 days ago

      No, it’s Javascript, keep up

      • FanBlade
        link
        fedilink
        English
        arrow-up
        51
        ·
        2 days ago

      • ChickenLadyLovesLife@lemmy.world
        link
        fedilink
        English
        arrow-up
        9
        ·
        2 days ago

        Javascript is basically just C with some syntactical sugar, right? RIGHT?!?

        • mcv@lemm.ee
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 day ago

          To the contrary, it’s Lisp with a lot of syntactic sugar to make it look more like C, but underneath it’s nothing like C. It’s a weird hybrid.

        • kryptonianCodeMonkey@lemmy.world
          link
          fedilink
          arrow-up
          7
          ·
          edit-2
          2 days ago

          Say when…

        • AngryCommieKender@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 day ago

          I would say that your username doesn’t check out, but being honest we’re all coders, or at least script kiddie pirates, around here.

          • ChickenLadyLovesLife@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            1 day ago

            For reference.

    • MajesticElevator@lemmy.zip
      link
      fedilink
      arrow-up
      12
      ·
      2 days ago

      Wtf? Min > Max???

      • Pup Biru@aussie.zone
        link
        fedilink
        English
        arrow-up
        18
        ·
        edit-2
        2 days ago

        Math.min isn’t the minimum integer; it’s the minimum of a list (and max visa versa)… the min/max of an undefined list is the same… IDK what it is, but this probably the most reasonable of the “WTFs” they could have put there i think… other languages would throw an exception or not compile (which JS definitely SHOULD do instead of this, buuuuut lots of JS has aversions to errors)

        *edit: okay the curiosity was killing me: Math.min() is Infinity and Math.max() is -Infinity

        • MajesticElevator@lemmy.zip
          link
          fedilink
          arrow-up
          4
          ·
          2 days ago

          That explains it then. It could be mislead for -inf and +inf

Programmer Humor@programming.dev

programmer_humor@programming.dev

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.

  • 249 users / day
  • 4.11K users / week
  • 7.76K users / month
  • 17.1K users / 6 months
  • 79 local subscribers
  • 23.3K subscribers
  • 1.38K Posts
  • 46.4K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • UI: 0.19.11-nsfw
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org