DEV Community

Discussion on: Stop Writing JavaScript Like This

Collapse
 
akashkava profile image
Akash Kava • Edited

On mobile, difference is 90%, try it and then see. You are creating an array, unnecessary memory allocation and calling a method, which are multiple cpu cycles. Compound it multiple time used in single script it is by far the worst practice. Test on iPhone