JS_advice's profile picture. JavaScript advice #parody

JS_advice

@JS_advice

JavaScript advice #parody

Let’s do it! Angular vs. JVM vs. XML vs MongoDB.


Local variables slow your code down; use globals and define them at the top of your file. Single character names speed up code x30.


Don’t you find it funny how only *other* people write crap code?


Comment liberally, because your coworkers are morons and can never understand the brilliance of your mind.


Use CoffeeScript.


Confucius say, typeof is operator, not function, stupid.


Confucius say, dom is piece of pie to be eaten.


Set all your variables to null at the end of every function. Helps free up memory.


Use 'new RegExp` instead of `/.../` as the latter is susceptible to XSS.


Why rely on the native JSON.parse when you can write your own parser!?


I'm gonna need you to go ahead and add a redundant doc comment above every single variable... k?


Don't just limit yourself to single or double quotes. Use both of them in unsparing and inconsistent fashions.


Make love, not JavaScript.


function isJavaScriptEnabled() { return true ? true : false; }


You can annotate a line of JS to run faster by prefixing with '//'


LOL some guy told me JSON is not the same as object-literal syntax... HAHAHA


You know what's better than one var declaration per scope? One var declaration per application. Yup.


Loading...

Something went wrong.


Something went wrong.