title: How do I add properties to an object from an array?
body: <p>The JavaScript problem I am working on is as follows:</p>
  
  <p>"You are provided with an array, possibleIterable. Using a for loop, build out the object divByThree so that each key is an element of possibleIterable that is divisible by three. The value of each key should be the array index at which that key can be found in possibleIterable."</p>
  
  <p>I understand how to add properties from an object to an array but doing vice-versa is confusing. I was able to create a new array and push the elements that are divisible by three and now I am stuck on how to turn those elements into properties for the object divByThree while also having the object keys be numbers.</p>
  
  <p>I thought object keys can't be numbers...</p>
  
  <pre><code>const possibleIterable = [4, 3, 9, 6, 23];
  const divByThree = {};
  // ADD CODE HERE
  let arr = [];
  for (let i = 0; i &lt; possibleIterable.length; i++) {
     if (possibleIterable[i] % 3 === 0){
       arr.push(possibleIterable[i])
     }
  };
  
  console.log(arr)
  </code></pre>
  
  <p>The results from the code shown is [3, 9, 6] and the result I want is for divByThree to log to the console { 3: 1, 6: 3, 9: 2 }</p>