I have been learning NodeJS recently.
It seems to be standard in the Node world to write code with commas first:
var connect = require('connect')
, HTTPSServer = require('./https')
, HTTPServer = require('./http')
, Route = require('./router/route')
I don't like it and my code editor via JSLint throws countless errors.
My question is: is there a justifiable reason why "nodesters" are doing this or is it just a cool new style?
Until now I have been "correcting" it by putting the commas back "where they should be" to comply with JSLint.
But it occurred to me recently that this approach is not very sustainable, especially if I am going to make use of more community modules.
Generally, it makes for cleaner looking code (subjective), and easy spotting of errors. Happy reading
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With