I have the following code in my HTML file:
Place the semi-colon after the function declaration:
window.never = function() {
console.log('this function is never called');
};
It's because of the (...)
directly afterwards that triggers the function call.
window.never = function() {
console.log('this function is never called');
}
( ... ) // <-- Triggers call of `window.never`