Javascript compare 3 values
<p>I have 3 values that I want to compare f, g and h. I have some code to check that they all equal each other and that none of them are null. I've had a look online but could not find anything that seemed to answer my query. Currently I am checking the code in the following way...</p>

<pre><code>if(g == h &amp;&amp; g == f &amp;&amp; f == h &amp;&amp; g != null &amp;&amp; f != null &amp;&amp; h != null)
{
//do something
}
</code></pre>

<p>This is quite long winded and I might be adding more values, so I was just wondering if there is a quicker way to check that none of the values are null and that all the values equal each other?</p>

<p>Thanks in advance for any help.</p>
