Cache the length and use !== instead of &lt;