4 ms·
Or just don't use classic IIFEs void function () { window.alert('ok') }() So much cleaner. Or better yet, stop using IIFEs. Unless you need IE1
by adrianhel 8y ago
Or just don't use classic IIFEs
void function () {
window.alert('ok')
}()
So much cleaner.
Or better yet, stop using IIFEs. Unless you need IE11 support and can't transpile your code there is absolutely no need.
{
let x = 42
}
console.log(typeof x) // undefined