title: Can't use a value of data object inside another value in vuejs
body: <p>I want to use a value in data object inside another value. When I try the code below:</p>
  
  <pre><code>data(){
     return {
        firstname: 'Shadi',
        greeting: 'hello' + firstname
     }
  }
  </code></pre>
  
  <p>I get an error that firstname is not defined. When I use the code below:</p>
  
  <pre><code>data(){
         return {
            firstname: 'Shadi',
            greeting: 'hello' + this.firstname
         }
      }
  </code></pre>
  
  <p>the error is not shown but the firstname is replaced undefined. How can I solve this problem?</p>