new to Javascript and it's quirks. Can somebody explain this to me? it works fine in CodeSandbox, but in VSCode and Chrome I'm hitting this problem:
setup() function not called in this code:
function init(){
...
}
function setup(){
...
}
init();
setup();
setup() function being called in this code:
function init(){
...
setup();
}
function setup(){
...
}
init();
Why does it execute in the last example, but not in the first?