I have a problem receiving a value from a void method
For example:
test() {
    var x = this.test2("hi there");
    console.log(x);
}
test2(data){
    return data;
}
I want to receive the data from test2 but it keep saying undefined what do I do wrong in here? And how can I make this work?
It is probably so basic but I just want to know why I receive the value undefined
 
     
     
    