style: get ride of the for.length JS heritage

Closes #615