Modern Javascript Find method
In javascript, the Find method is used to find out the data conditionally. If the data matches according to condition, it will not go to the next element.
Exampel of Find method:
const family =[
{“name” : “jemy”, “age” : 5},
{“name” : “jack”, “age” : 20},
{“name” : “jerin”, “age” : 8},
{“name” : “joni”, “age” : 50},
];
const age = family.find(data => data.age>18)
console.log(age) //20