title: Trying to dynamically create a URL using a v-for loop and object properties but getting a GET error
body: <p>An object has some properties and 6 of them are called <code>item0, item1, item2, item3, item4 and item5</code>. I want to render 6 images using those properties values in the URL and the way I see it, I could either copy the image element 6 times and just change the item number like this:</p>
  
  <pre><code>&lt;img v-if='match.mainParticipant.stats.item0' :src="'http://ddragon.leagueoflegends.com/cdn/' + $store.getters.version + '/img/item/' + match.mainParticipant.stats.item0 + '.png'" alt=""&gt;
  &lt;img v-if='match.mainParticipant.stats.item1' :src="'http://ddragon.leagueoflegends.com/cdn/' + $store.getters.version + '/img/item/' + match.mainParticipant.stats.item1 + '.png'" alt=""&gt;
  &lt;img v-if='match.mainParticipant.stats.item2' :src="'http://ddragon.leagueoflegends.com/cdn/' + $store.getters.version + '/img/item/' + match.mainParticipant.stats.item2 + '.png'" alt=""&gt;
  &lt;img v-if='match.mainParticipant.stats.item3' :src="'http://ddragon.leagueoflegends.com/cdn/' + $store.getters.version + '/img/item/' + match.mainParticipant.stats.item3 + '.png'" alt=""&gt;
  &lt;img v-if='match.mainParticipant.stats.item4' :src="'http://ddragon.leagueoflegends.com/cdn/' + $store.getters.version + '/img/item/' + match.mainParticipant.stats.item4 + '.png'" alt=""&gt;
  &lt;img v-if='match.mainParticipant.stats.item5' :src="'http://ddragon.leagueoflegends.com/cdn/' + $store.getters.version + '/img/item/' + match.mainParticipant.stats.item5 + '.png'" alt=""&gt;
  </code></pre>
  
  <p>Or I could just make a v-for loop and loop over the numbers 0-5 like this:</p>
  
  <pre><code>&lt;img v-for="i in 6" :src="'http://ddragon.leagueoflegends.com/cdn/' + $store.getters.version + '/img/item/' + match.mainParticipant.stats.item + (i - 1) + '.png'" alt=""&gt;
  </code></pre>
  
  <p>You might notice that I'm looping through 1-6 but that's because v-for loop starts from 1 for some reason. This is why I subtract 1 later. Sadly for some reason this code doesn't successfully get the images and in the console I get the error:</p>
  
  <pre><code>GET http://ddragon.leagueoflegends.com/cdn/9.16.1/img/item/undefined4.png 403 (Forbidden)
  </code></pre>
  
  <p>Obviously the undefined4 should be item4 instead in order for this to work, but I can't figure out why the URL becomes like that.</p>