I came across a suggestion online for making an if statement more concise:
if([1,5,7,22].indexOf(myvar)!=-1) alert('yeah')
Instead of the longer version like this:
if( myvar==1 || myvar==5 || myvar==7 || myvar==22 ) alert('yeah')
Is there a way to achieve this with only three different values for myvar? I am looking to condense the original statement to:
if(i('b').style.display == a[1] & i('c').style.display == a[1] & i('d').style.display == a[1])
I am hoping to simplify this as much as possible... any suggestions? Despite extensive research, I have not been able to find a solution...