32
tahnik
7y

Fuck it, I am not going to use any semicolon in my next javascript project.

Comments
  • 1
    Preach brother 🙌
  • 2
    I call BS :p
  • 1
    It certainly looks better. Look up AdonisJS. The style convention for the framework is to be semicolonless
  • 3
    @neodite I swear

    @dev0urer It surely does. Love it.
  • 2
    @Letmecode yeah no way I am going to ditch semicolons in a project where I have to collaborate with other people. Right I am working on a personal not-so-high priority client project. It's a good one to try out new things.
  • 0
    @console i disabled it right away. I love brackets, semicolons and the like.
  • 0
    It looks better without semicolons but Jshint bitches me about it.
  • 0
    Use Coffeescript and stop complaining :D
  • 0
    Never use them just make sure your iifes have ! In front of them. Lol
  • 0
    But... But... How are you going to write a generic for loop then? 🤔
  • 0
    I know I should. But code looks just so clean without them
  • 0
    Sacrilege! Burn the Witch!
  • 1
    @Froot for loops are old. Array.forEach is the way to go
  • 1
    @Dacexi for loops still have their place.
    For example when you want to copy a slice of array A to a new array B in an arbitrary order and care about the performance
  • 0
    Reduce is a good tool for array copping arrays. unless your making some sort of game or the like. The performance difference​ is negligible.
  • 0
    @jamesharrington How do you mean? Doesn't reduce reduce an array into a single value?
  • 0
    @froot Reduce in js is used for much more than converting an array to a single value. it can do almost anything a for loop can.
  • 0
    @jamesharrington Hmmm ok. Could you give an example? I never used it like that
  • 0
Add Comment