https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/find
const array1 = [5, 12, 8, 130, 44];
const found = array1.find(element => {
const a = 5;
element === a;
});
console.log(found);
> undefined
const array1 = [5, 12, 8, 130, 44];
const found = array1.find(element => {
const a = 5;
return element === a;
});
console.log(found);
> 5