Reputation: 29
Let's say I'm making a farming game and I want a span to read "0 tomato plants" and count up at 4 tomato plants per second. I haven't the slightest idea of how to form this (I'm really new to javascript) and I can't find anything online. Essentially I'm trying to make something similar to Candy Box.
Upvotes: 1
Views: 234
Reputation: 11468
setInterval(function(){function_to_plant_4_tomatos()},1000);
Upvotes: 1