So, here is the code which is using find helper in javaScript and supposed to return a value but instead of that it is showing undefined.
function Car(model) {
this.model = model;
}
var cars = {
new Car('Buick'),
new Car('Camaro'),
new Car('Focus')
};
cars.find(function(car){
return car.model === 'Focus';
});
I am running this code in VB and the output supposed to be Focus but it is showing undefined.