I have a constructor that has a series of classes and functions within it - in each function I check if the param is set to show the error and output if so. Like so using an inline if. The issue and question is short of keeping two versions is this approach not wise in that each IF has to be evaluated thus adding to the time it takes to perform?
debugSlide = (bag.debug==1)? console.log("item id =" + bag.itemId) : 0;
How do you do this? Any pointers on where I can find tips on this? Thanks in advance!