refactorjs's profile picture.

Refactoring JS

@refactorjs

If you declare an empty array and push things onto it in a loop, use map instead. refactoringjs.com/index.html#use… #js #javascript #refactoring


Next up: the first file #refactoring in #JavaScript Commented out/speculative code is useless. Get rid of it. refactoringjs.com/#speculative-a… #JS


Instead of using an expensive query multiple times, cache it in a variable: refactoringjs.com/#introduce-var… #JS #JavaScript #Refactoring


How often should you reassign variables? Try to use "const" in most cases instead: refactoringjs.com/index.html#don… #refactoring #javascript #js


Today's #JavaScript #refactoring: Avoiding bad names for variables: refactoringjs.com/#bad-variable-… #JS A few more easy ones left to go – stay tuned


First #JavaScript #Refactoring is a simple one, but important. Avoid "magic numbers" by declaring a variable - refactoringjs.com #js


United States 트렌드

Loading...

Something went wrong.


Something went wrong.