logo
logo

Crypto Portfolio

Crypto Portfolio

Create an object constructor named
CryptoCurrency
that takes in the following parameters:
name
,
symbol
, and
price
. It should return an object with these properties. Add a method named
calculateValue
to the
CryptoCurrency
prototype object that calculates the total value of a given quantity of the cryptocurrency. For example,
calculateValue(5)
would return the total value of 5 units of the cryptocurrency based on its price.
Console
Submit
Solution
00:00