Ternary logic for created a dijit in dojo
<p>This is fairly simple to do in a if/else but, I am trying to get into ternary logic and how it works. This is my first attempt at it.</p>

<pre><code> if(condtion == true){
                        var showProtected = new dijit.form.CheckBox({                                                               
                            checked: true
                        })else{
                            showProtected = new dijit.form.CheckBox({
                            checked: false
                            });     
                        });
                         showProtected.placeAt("showProtected", "first");   
}
</code></pre>

<p>I tired but does not work: </p>

<pre><code>showProtected = (condition == true) ? new dijit.form.CheckBox({                                                             
                            checked: true
                        }) : new dijit.form.CheckBox({
                            checked: false
                        });     
                         showProtected.placeAt("showProtected", "first");   
</code></pre>
