Find Crypto by Name
findCryptoByName
that takes an array of cryptocurrency objects and a string name, and returns a Promise that resolves to the first cryptocurrency object with a matching name. The cryptocurrency objects have a name
property.
For example, findCryptoByName([{ name: 'Bitcoin', price: 50000 }, { name: 'Ethereum', price: 2000 }], 'Ethereum')
would return { name: 'Ethereum', price: 2000 }
.