JS_advice
@JS_advice
JavaScript advice #parody
You might like
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.
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.
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.
United States Trends
- 1. #BaddiesUSA 62.7K posts
- 2. TOP CALL 3,501 posts
- 3. Rams 29.8K posts
- 4. #LAShortnSweet 22.8K posts
- 5. #centralwOrldXmasXFreenBecky 356K posts
- 6. SAROCHA REBECCA DISNEY AT CTW 376K posts
- 7. Scotty 10.2K posts
- 8. AI Alert 1,099 posts
- 9. Chip Kelly 8,881 posts
- 10. #LingOrmDiorAmbassador 190K posts
- 11. Market Focus 2,356 posts
- 12. sabrina 65K posts
- 13. #ITWelcomeToDerry 16.3K posts
- 14. Vin Diesel 1,410 posts
- 15. Raiders 68.6K posts
- 16. Ahna 7,525 posts
- 17. Stacey 25K posts
- 18. Check Analyze N/A
- 19. Token Signal 1,500 posts
- 20. billie 20.2K posts
Something went wrong.
Something went wrong.