Async While Loop Javascript Break And Continue Java