Do While loop in JS