var strExt = GetAttributeFromItemTable(itemTable, "Ext", "FileType");
I made a warning for strExt and it resolved. if (strExt! = 'wav') {// this works}
if (strExt!='wav' || strExt!='mp3') { // this does not work. }
Your logic is wrong:
if your variable strExtwas equal 'wav', it would not be equal 'mp3'and versa-visa.
strExt
'wav'
'mp3'
Please explain your desired results more clearly.
I think you are trying to say something like (neither 'wav', nor 'mp3'):
if ( !( strExt == 'wav' || strExt == 'mp3' ) )
which is logically equivalent (not 'wav', not 'mp3'):
if ( strExt != 'wav' && strExt != 'mp3' ) )
, True strExt ( "wav", "mp3" ). ?
True
, OR ( " " wav ", " mp3 ")?
|| : - , , .
, true || false , falls || true .
true || false
falls || true
: " strExt wav mp3, ". , , .
, && . logical and : " true, " - , false.
logical and
, :
if (strExt!='wav' && strExt!='mp3')
, , , :
if ((strExt !== "wav") && strExt !== "mp3") { }
OR .
if, strExt 'wav', 'mp3', &&.
if
&&
if (strExt!='wav' || strExt!='mp3')
strExt='wav' = > strExt!='wav'= false; strExt!='mp3'= true = > false true = true if strExt='mp3'.
strExt='wav'
strExt!='wav'
strExt!='mp3'
strExt='mp3'
if ((strExt!='wav') || (strExt!='mp3')) { // this does not work. }