> or the compiler
Functions can be assigned at runtime. It would have to be a runtime error.
Functions can be assigned at runtime. It would have to be a runtime error.
So it's NOT a runtime error, it's a compile-time error, even though you can assign different functions at runtime.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Static code will get checked at compile-time, even though the exact function passed as callback depends on the incoming data via a series of if/case statements say, from a dictionary or whatever.