Javascript assiging multiple values to `ternary` operator
javascript
Solution
var size=3;
var val1=null;
var val2=null;
size === 3 ? ( val1=999,val2=100 ) : 0;
console.log(val1,val2)
Problem
How to assign multiple values to `ternary` operator? is that not possible? I tried like this, but getting error: ``` size === 3 ? ( var val1=999, var val2=100; ) : 0; ``` and ``` size === 3 ? ( var val1=999; var val2=100; ) : 0; ``` above both approach throws error. how to set both `var val1` and `var val2`; I can directly declare it. But I would like to know the ternary operator approach here.