created while loop.js