While loop in JS incrememnt doubleing numbers