themactep.com

A home of miscellaneous projects by Paul Philippov.

Notes

Compare length of similar JavaScript code

When writing code for tiny amount of storage like micro-controller it is very important to be as short as possible.

// c = collection
// i = iterator
var c,i;
for(i=0;i<c.length;i++){c[i]}         <-- shorter
i=c.length-1;while(i>=0){c[i];i--}