Javascript, check multiple arrays for number
<p>I'm looking for the best solution here, i've got an idea but thinking it could be done prettier.</p>

<p>I'm making an simple weather application. And i'm using Yahoo Weather api were they have got codes for weather conditions.</p>

<p>Depending on the condition i'm giving a code. Now, there are 50 codes and i've categorised them into 5 categories. In my case ex. my categori Snow contains 15 of Yahoo's condition codes.</p>

<p>Well, if you got a better idea (which i bet there is) be free to suggest.</p>

<p>My thought is to return the matching value from a set of arrays, but not shure how to do it.</p>

<p>My code now looks like this:</p>

<pre><code>function getCondition(code) {
   var snow = [1, 2, 3],
       sun = [4, 5, 6];
} 
</code></pre>

<p>What i need is the variable name that contains the matching number of the code?</p>

<p>I've made a JS-Fiddle
<a href="http://jsfiddle.net/BH8r6/" rel="nofollow">http://jsfiddle.net/BH8r6/</a></p>
