Sign In
Curriculum
Crypto Coin Constructor
Mark as Completed
Crypto Coin Constructor
Create a constructor function 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.
Click to go back
Click to go forward
Refresh preview
Console
Submit
Solution
00:00
Previous Lesson
Next Lesson