You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (let element = document.getElementyById('foobar')) {
element.someMethod();
}
This allows to have the variable properly block scoped, making it only available in the conditional block body. It should be possible to use const and let.
The text was updated successfully, but these errors were encountered:
Example:
This allows to have the variable properly block scoped, making it only available in the conditional block body. It should be possible to use
const
andlet
.The text was updated successfully, but these errors were encountered: