Codepen here: https://codepen.io/chunzg/pen/oNYqdKa
When I click clear and then ok in the alert message, I want to input a new value that is not the default 5 minutes, for example 8 minutes. However when I click start again, it always starts the timer from the previous value (eg. 5).
How do I grab the most latest input value and make sure the timer starts from this latest value and not the previous one?
It’s weird because if I type in any number on the first time, it works perfectly. It’s only after I press clear and ok, that there is this issue.