in theory the n*n calculation would be done everytime, so at least + 2 operations.
But these are just theoretical assumptions we would need to benchmark it maybe JS caches the n*n expression / evaluates it once since it sees that it isn't changed inside the loop.