title: Run a function on every element of an array
body: <p>I'm new to JavaScript and I would like to run a function on every element of an array.</p>
  
  <p>To be more specific, in my code, I have an <code>onclick</code> function. When I click on an element, I want 3 other elements to move. The problem is that only 1 element is moving for each click.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>var intersects = raycaster.intersectObjects(reel);
  var intersects1 = raycaster.intersectObjects(rang1);
  var intersects2 = raycaster.intersectObjects(rang2);
  var intersects3 = raycaster.intersectObjects(rang3);
  var intersects4 = raycaster.intersectObjects(rang4);
  var inter1 = intersects1.join()
  console.log(intersects2)
  
  if (intersects.length &gt; 0) {
      //console.log(intersects1)
  
      if (intersects[0].object.type === "Mesh") {
          var objinter = intersects1[0].object;
          //DEPLACEMENTS
  
          new TWEEN.Tween(intersects1[0].object.position).to({
                  x: objinter.userData.x0,
                  y: objinter.userData.y0,
                  z: objinter.userData.z0
              }, 1000)
              .easing(TWEEN.Easing.Elastic.Out).start();
  
      }
  };
  </code></pre>
  
  <p>Is it possible to call every element of the array <code>intersects1</code> at once, and how would I do this?</p>