How to call function inside function in ionic3 i have tried with this function but not working and i got error in console '=>' expected tell me anyone how to fix this?
shareProductWithSelectedUser(event) {
var self = this;
var arr1 = "";
var arr2 = "";
var arr3 = "";
// Iterating loop - continue only after callback from Firerbase.
var x = 0;
var loopArray(arr1, arr2, arr3) {
// here calling inner function for share product with three param(userId, userTypeId, callback)
self.callFuncForShareProduct(arr1[x], arr2[x], arr3[x], (function) => {
// any more items in array? continue loop
if(x < arr1.length) {
this.loopArray(arr1, arr2, arr3);
};
});
// start 'loop'
loopArray(self.userIdListForShareProduct, self.userTypeIdListForShareProduct, self.userObjectListForShare);
}