Jamesj999 Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Sheldan@programming.dev to Programming@programming.dev · 15 hours ago

new Date("wtf")

jsdate.wtf

external-link
message-square
32
fedilink
135
external-link

new Date("wtf")

jsdate.wtf

Sheldan@programming.dev to Programming@programming.dev · 15 hours ago
message-square
32
fedilink
How well do you know JavaScript's Date class?
alert-triangle
You must log in or register to comment.
  • brb@sh.itjust.works
    link
    fedilink
    arrow-up
    3
    ·
    2 hours ago

    Except for some reason “2” is interpreted as a month, and the year is set to 2001.

    Aight I’m out

  • Mr. Satan@lemmy.zip
    link
    fedilink
    arrow-up
    1
    ·
    3 hours ago

    I scored 10/28 on https://jsdate.wtf/ and all I got was this lousy text to share on social media.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    5 hours ago

    Ha this is even worse than I could have imagined!

  • Sorse@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    4 hours ago

    12/28

    Surprised that I got this score when I only know python

  • MTK@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 hours ago

    This is just a good reminder of human nature to make bad choices (using JS) and stick with them forever.

  • lunarul@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    8 hours ago

    If you’re not very familiar with JS, watch the Wat talk before taking the quiz to know what to expect from this wonderful language.

    • Lemminary@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      6 hours ago

      And then promptly get yourself familiar with how the language actually works. https://github.com/getify/You-Dont-Know-JS

      People who complain about JS often assume it has features of other languages and fail to realize it has its own architecture and winding history.

  • tatterdemalion@programming.dev
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    6 hours ago

    Can we start a new web with a better language/platform already?

    • FizzyOrange@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      5 hours ago

      Google tried to do that with Dart, and failed. In fairness Dart 1 was much worse than Dart 2… So maybe that was a good thing because there’s no way they’d have been able to improve Dart as much as they have if it was part of the web.

      For dates there finally is something better anyway: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal

    • esa@discuss.tchncs.de
      link
      fedilink
      arrow-up
      1
      ·
      4 hours ago

      There’s wasm if you need to target browsers.

    • FooBarrington@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      2
      ·
      5 hours ago

      Why? Why not improve JS (e.g. with Temporal), especially given how excellent Typescript is?

      • tatterdemalion@programming.dev
        link
        fedilink
        arrow-up
        7
        arrow-down
        1
        ·
        5 hours ago

        JS is a lost cause.

        • FooBarrington@lemmy.world
          link
          fedilink
          arrow-up
          2
          arrow-down
          2
          ·
          5 hours ago

          How? It’s easy not to run into the common issues by using TS. What’s so bad about it that we should throw away the existing ecosystem?

          Please give arguments instead of platitudes.

  • atzanteol@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    6
    ·
    8 hours ago

    Nobody understands JavaScript. It’s the quantum mechanics of the software world.

  • fubarx@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    6 hours ago

    9/28. WTF’ing through 90% of the questions.

  • Xylight@lemdro.id
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 hours ago

    I don’t like calling myself a JS/TS dev but my biggest project that I currently work on is written in it, so I had to try it.

    16/28. I mean it’s incredible how I can throw a diabolical amount of variations of formatting at it and somehow get valid dates.

  • hperrin@lemmy.ca
    link
    fedilink
    English
    arrow-up
    15
    ·
    11 hours ago

    I scored 13/28 on https://jsdate.wtf/ and all I got was this lousy text to share on social media.

    Oof. I’ve been a JS dev since 1998.

  • DrWorm@piefed.social
    link
    fedilink
    English
    arrow-up
    20
    ·
    11 hours ago

    The quirks in this quiz aren’t even universal, and vary based on which browser you’re using. See the table at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#non-standard_date_strings

    Also I got 13/28 😑

  • ragingHungryPanda@lemmy.zip
    link
    fedilink
    arrow-up
    16
    ·
    11 hours ago

    I got 10/28, but I was crying after the 7th question

  • schnurrito@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    6 hours ago

    7/28. Of course no one would ever do most of those things, they are interesting to think about but with little practical use.

  • tleb@lemmy.ca
    link
    fedilink
    arrow-up
    6
    ·
    10 hours ago

    I scored 17/28 on https://jsdate.wtf/ and all I got was this lousy text to share on social media.

    Idk anything about Date but got pretty far with intuition of JS whackiness

Programming@programming.dev

programming@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: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Visibility: Public
globe

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

  • 370 users / day
  • 1.16K users / week
  • 2.65K users / month
  • 7.44K users / 6 months
  • 1 local subscriber
  • 21.5K subscribers
  • 2.35K Posts
  • 36.2K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • MaungaHikoi@lemmy.nz
  • UlrikHD@programming.dev
  • BE: 0.19.9
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org