• jjjalljs@ttrpg.network
    link
    fedilink
    arrow-up
    11
    ·
    10 hours ago

    I don’t know about “fine”. It has a lot of weird stuff baked in. Hoisting. Unexpected type coercion. Too many ways to loop over something and I always forget which one is which. “There’s more than one way to do it” is kind of a recurring problem, come to think of it. Several function declaration syntaxes. Dot notation AND bracket notation for objects.

    Also it will forever bother me that object keys aren’t quoted.

    const foo = "hello"; const bar = { foo: "world" }

    That should be, in my mind, { "hello": "world" } . It’s not. It’s { "foo": "world" }

    But if you want to do that, you need to do const bar = { [foo]: world }. Which looks like your key is an array with one entry, a string with a value of “foo”

    You also end up learning a whole framework, with its syntax and idioms, every couple years. Angular. React. Redux. Whatever.

    There’s also a lot of people who have never used anything else, and want to use javascript for everything.

    Javascript is basically D&D. Wildly popular. Full of legacy jank. People try to use it for anything even though there are better or more specialized tools.

    • SaharaMaleikuhm@feddit.org
      link
      fedilink
      arrow-up
      1
      ·
      2 hours ago

      No need to convince me it’s shit. Also how do you end up only knowing Javascript? Who the hell starts out using Javascript of all the languages?

      • jjjalljs@ttrpg.network
        link
        fedilink
        arrow-up
        1
        ·
        1 hour ago

        Anyone entering through web development. If you’re self taught or did a “coding boot camp”, it might be the only language you’ve used. A lot of places use it for backend stuff now, too

    • Lemminary@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      7 hours ago

      After reading the JS Bible and listening to a lot of Kyle Simpson, I don’t find any of those unusual or unexpected, but rather neat in the context of the language. And with enough practice, even the implicit return of an arrow functions jumps out at you.