3 ms·
// yes for(let i=0, n=posts.length; i<n; i++) { There's usually no need to cache the length of the array this way. Modern JS VMs are plenty smart enough to
by fenomas 8y ago
// yes
for(let i=0, n=posts.length; i<n; i++) {
There's usually no need to cache the length of the array this way. Modern JS VMs are plenty smart enough to do it automatically (unless there's code in the loop that looks like it might change the array length).