How to check if a variable exist in jquery
<p>I have two variables in a jquery code and if item.a not exist, it outputs a 'null' so i want to check if the variable exists. Here's the code:</p>

<pre><code>.append( "&lt;a&gt;" + item.a + ", " + item.b + "&lt;/a&gt;" )
</code></pre>

<p>If there is no "item.a" it results in</p>

<pre><code>null, Blabla
</code></pre>

<p>I tried this if / else statement but it returns nothing</p>

<pre><code>.append( "&lt;a&gt;" + (item.a) ? item.a : + ", " + item.b + "&lt;/a&gt;" )
</code></pre>

<p>Any idea?</p>
