I'd like to create a global const variable which needs to be declared in a callback of a timeout. The script is like this:
setTimeout(() => {
const hourandminute = new HourAndMinute();
}, 1000);
This will create a new const variable but it will only exist in the callback. How do I make this global without doing the following;
let hourandminute;
setTimeout(() => {
hourandminute = new HourAndMinute();
}, 1000);