logo
logo

Create a Digital Wallet

Create a Digital Wallet

Create a class called Wallet that takes in an array of CryptoCoin objects and has a method called getTotalValue that returns the total value of all the CryptoCoins in the wallet. For example, let wallet = new Wallet([new CryptoCoin('Bitcoin', 50000), new CryptoCoin('Ethereum', 2000)]); wallet.getTotalValue() should return 52000.

Console
Submit
Solution
00:00