162
lpcm
3y

"Replacing all === with == will make the code shorter, thus will make the loading faster."

Comments
  • 5
    Also using ' instead of " makes it smaller thus faster!
    And don't do new lines, just write your code in one mothefucking line! 🙄
  • 19
    I think my IQ dropped about 20 points just from reading that
  • 1
    @gitpush All good devs write minified code don't they? I do, and I'm a good Dev *toot!*

    (If you've watched Ben and Holly you'll get the toot reference 😉)
  • 1
    @Froot lol yes yes from now on I'll write all code on one line 😎
  • 2
    since javascript is interpreted, isn't that kinda true? in that it will download (a little) faster at least
  • 3
    @xalez No. That's what minifiers are for. You write your code so it's nice and easy to understand and then you run it through Webpack to build it for production. That way you get best of both worlds
  • 1
    @Froot ah, right .. so it's technically true but it's that you don't have to do it yourself?
    well that's not too bad
  • 0
    @DLMousey please help
  • 1
    @xalez Yeah.
    Also == is dangerous. === is much better. CBA to explain it here sry 😄
  • 0
    @Froot nah that's fine .. I was just commenting on the fast load bit, === being safer doesn't negate it being slower :D
  • 1
    @xalez Well it's not slower, could actually be faster since there's no type conversion at play 😋
  • 2
    @Froot correct.. maybe
    the question then is: is it faster to download an '=' or to convert a type 🙃🤔🕵
  • 1
  • 4
    @Lahsen2016 this is from Firefly!
  • 1
    Yeah, I don't use == at all so my code runs faster. "!!" is better. Much smaller.
  • 0
    Step 1. "use strict"

    Step 2. Use ===

    Step 3. Congrats, your code is less garbage

    Step 4. Troubleshoot
  • 2
    @byte-me Malcolm Reynolds > Richard Castle 😁
  • 3
    @shellbug oh god, yeah!
  • 0
    Well, technically he wasn't wrong, but it'll just take a couple of CPU cycles less (which, depending on the length of your code, wouldn't even remotely make a 1ms difference)
Add Comment