Need to Find and Count given variable in Javascript Array
<p>Hello I would be grateful if anyone could provide solution for the following problem that I have:<br>
I need to find if given variable exists in Array;  </p>

<pre><code>var arr = new Array(4, 1, 4, 1, 4)  
var number = 4;  
var number_two = 1;
</code></pre>

<p><strong>is there a way to count how many times "var number" exists in "arr" and what are the indexes of this number in Array;</strong><br>
Thanks,</p>
