lookforcustomers(value){
if (value == 'on') {
var name = 'subash';
this.intervalid = setInterval(async function getnearplaces(nameref) {
console.log('running', this.name)
// console.log('loc',outerthis.state.lastknownlocation.latitude)
// var driverpoint = new Parse.GeoPoint({latitude:this.ref.state.lastknownlocation.latitude, longitude:this.ref.state.lastknownlocation.longitude});
// var GameScore = Parse.Object.extend("Booking");
// const query = new Parse.Query(PlaceObject);
// query.equalTo("hired",false);
// query.near("pick", driverpoint);
// query.limit(1);
// const placesObjects = await query.find().then((object) => {
// console.log(object[0])
// }, (error) => {
//
// console.log('error while looking for the customers')
// });
}, 10000);
}
}
I just need to access name-value from getnearplacesfuntion()
. When I try to log the name value it is not printing. Is there any other procedure to access name value or is there any flaw in code above?