Assigned reference to length so we don't have to access length property in loop.