How can I test multiple test conditions using jQuery template "if"? For example, in any language I would do something like:
if(str1=='abc' && str2=='def'){
//do something
}
But how can it be done using jQuery template "if" clause? I tried following but it doesn't work.
{{if str1=='abc' && str2=='def'}}
//do something
{{/if}}
You must create some helper function in order to check multiple "AND" conditions. On the other hand,
||
(OR) can be done this way:{{if x===1 y!==2}}