I am working on a piece of JS code. In a tutorial I found a piece of code I don't understand:
const position = this.quotes.findIndex((quoteEl: Quote) => {
return quoteEl.id == quote.id;
});
I think the person who wrote the code stuffed a lot of different pieces into this line. Can somebody help me bring that into a more "easy to understand" form?
For example, the argument of the findIndex method can probably written in a separate function, right?
Thanks, Benjamin
trueit finds, the=>is an Arrow Function