DEV Community

hezekiah02
hezekiah02

Posted on

How to use Timer for calculation in React JS

I was working on a React project that I need the system to
do a calculation e.g If the user supply a value of Bomb to
be 10 and Energy to be 5. it means the number of bomb the
system is going to generate is 10 at every one minute in 5
times(the number of energy) which is equal to 50... so, at
every one one minute I need the system to keep doing the
addition i.e The number of bomb generated at one minute is 10,
the number of bomb generated at two minute is 20, the number
of bomb generated at three minute is 30 e.t.c until five
minute(which is the value of energy supplied) and after that
five minute the timer will stop. Any help on this please guys!

Latest comments (0)