Arrays
Array.find()
Learn how to use Array.find() in JavaScript.
Array.find()
Documentation for Array.find() in JavaScript.
Syntax
arr.find(x => x.id === 1)
Example
// Practical usage
arr.find(x => x.id === 1)
console.log("Executed successfully.");
Notes
JavaScript provides powerful built-in methods for the web.
Try It Yourself
You can run JavaScript directly in the BrowserCode Playground.