Using multiple conditions in ? : statements in javascript
<p>In need to check three conditions and assign a value to a variable according the condition. </p>

<pre><code>if(a =="z1"){
   b = "one";
} else if(a =="z2"){
   b = "two";
} else if(a =="z3"){
   b = "three";
}
</code></pre>

<p>Is it possible to do it in JavaScript using ? : statement to make it as a single line code</p>