I know the infinite recursive loop case would not be reproduced here , but it would great to avoid the assignment in loop condition for any possible problem(and for passing the jshint :p)