How to reference data variable from another data variable in Vue 2? : <p>I have this in vue data:</p>

<pre><code>data() {
    return {

      names: [],
      length: names.length,
}
</code></pre>

<p>But this does not work as RefereneError ( names is undefined ) is thrown. I used this.names but makes no difference.</p>
