This function with get / http / subscribe does not return the correct value, it returns undefined, why?`
function_one() {
let text = this.getData();
console.log(' Here text is undefined --> ', text);
}
getData() {
this.http.get("assets/img/tutorial/tutorialenus.JSON").subscribe
(response => {
console.log(' Here response = The simple text', response);
return response;
}
);
}