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