shankar_r
8 years agoCommunity Hero
tristaanogre yes we can do scripting without declaring, However in below cases script fail due to undefined.
1) Variable not declared but it is used in function parameter like below, In this case testvar is undefined hence it will shoot a error.
function test() { var param1 = "test"; testcalfunction(param1,testvar); }
2) Variable declared but typo [this basically developer mistake but if have this option we can caught ]
function test() { var para1 = "test"; var testvar = "test2"; testcalfunction(param1,testvar); }
Related Content
- 9 months ago