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