nit: Isn't it best practice to call these global functions by `window.confirm()` instead of simply `confirm()`?