Not sure if this is the best way to name this question but I have the following code which does not like to run in strict mode. I need to set the contents/statements of the runstatementshere()
function, depending on the if
condition. Then runstatementshere()
will run as part of another function and be part of that scope.
if (i == true) {
function runstatementshere() {
// multiline commands
};
}
else {
function runstatementshere() {
}
}
function somecode() {
runstatementshere();
}