I have one javascript program in my module; say test1.js. It has IF..ELSEIF statements. My challenge is I want to call different .js programs based on conditions in IF-ELSE statements.
TEST1.js looks like -
-----
if(cond1) {
//want to call test2.js here
}
else if(cond2) {
//want to call test3.js here
}
How do I do this in javascript?
.jsfile. I have created different.jsfile based on conditions as code in those files is somewhat large. if i inserted it underIF..ELSEstatement then it may get messup