Replace your calls to setTimeout

Pro-tip: open your console?
First timeout length:
Value to log:

Second timeout length:
Value to log: