logo
logo

Crypto Coin Class

Crypto Coin Class

Create a class called
CryptoCoin
that takes in a
name
and a
price
. The class should have a method called
getPrice
that returns the price of the coin. For example, new
CryptoCoin('Bitcoin', 55000).getPrice() 
should return
55000
.
Console
Submit
Solution
00:00