title: How to define empty multidimensional array
body: <p>I need to use multidimensional array model in my vuejs project</p>
  
  <p><a href="https://jsfiddle.net/50wL7mdz/30596/" rel="nofollow noreferrer">Fiddle</a> of my code:</p>
  
  <p>I define an array in my vuejs data</p>
  
  <pre><code>new Vue({
    el: '#app',
    data: {
      message: 'Hello Vue.js!',
      arr: [[1,2],[3,4]]
    }
  })
  </code></pre>
  
  <p>and use:</p>
  
  <pre><code>&lt;p v-if="arr[3][0]"&gt;{{ arr[3][0] }} //Vue warn]: Error in render function: "TypeError: Cannot read property '1' of undefined"
  &lt;/p&gt;
  </code></pre>
  
  <p>but I have error when I call not defined index </p>
  
  <blockquote>
    <p>Vue warn]: Error in render function: "TypeError: Cannot read property
    '1' of undefined"</p>
  </blockquote>
  
  <p>I use <code>v-if</code> to skip undefined index but it doesn't work <a href="https://jsfiddle.net/50wL7mdz/30596/" rel="nofollow noreferrer">Fiddle</a></p>
  
  <p>How can I solve this problem and skip not defined index?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p><code>v-if</code> not work correctly because of using it in <code>&lt;br&gt;</code> tag I changed <code>&lt;br&gt;</code> to <code>&lt;span&gt;</code> and problem solved</p>