Constructor
new Flower(name, color, petals)
Parameters
-
name
string
name of the flower
-
color
string
color of the flower
-
petals
number
number of the petals
Source
Classes
Methods
bloom()
produce flowers; be in flower
Example
// returns '🌹'
flower.bloom();
Source
wilt()
(of a plant, leaf, or flower) become limp through heat, loss of water, or disease; droop
Example
// returns '🥀'
flower.wilt();