title: Get indices (indexes) of all occurrences of an element in an array
body: <p>I have an array. For example, [1, 2, 3, 4, 1, 2, 3, 4]. How do I get the position of the first "3" and the second "3" without altering the array? I realize that this is a similar question:
  <a href="https://stackoverflow.com/questions/8863549/javascript-get-position-of-the-element-of-the-array">Javascript - Get position of the element of the array</a>, but I want to find the position of both "3"s. Does anyone know how to do this? (without jQuery)</p>