I have below piece of conditional block in Javascript. I optimized it to the level possible by me, but I feel that it can still be more optimized.
Can someone please suggest a better way to write below code.
if(flag) {
this.flag = flag; /* some assignment*/
oldSearchType = newSearchType ? newSearchType : oldSearchType; /*Any better way to write this?*/
}