use brackets to access array ranges

plus you save a call to `arr.length`! ;)