• python
    link
    fedilink
    arrow-up
    16
    ·
    1 month ago

    Me neither, but I bet it’s still valid JS syntax

    • dohpaz42
      link
      fedilink
      English
      arrow-up
      9
      ·
      1 month ago

      Yes. In JavaScript, Objects without explicit keys will use the value as the key. At least that’s how it works in Chrome devtools output. 🤷‍♂️

      • ZoteTheMighty@lemmy.zip
        link
        fedilink
        arrow-up
        8
        ·
        1 month ago

        This is insane, but ultimately, FAR from the most insane thing JavaScript has done to me this week, so I’ll let it slide.