Ask coding questions

← Back to all posts
how do you show your cps in html
RyanCheung1

I am trying to complete a money clicker game, the last thing I need to complete is a cps tracker to show the clicks per second. pls give me the code to be able to do this

Voters
RyanCheung1
Comments
hotnewtop
InvisibleOne

in the JS

RyanCheung1

@InvisibleOne even though this works, it doesn't show the cps counter

InvisibleOne

wdym? Do you want it to display how many clicks per second you have, or did you want something else? @RyanCheung1

InvisibleOne

You mean update the score each time? add this inside of thesetInterval function.

@RyanCheung1

RyanCheung1

@InvisibleOne I want to display how many clicks per second I have

RyanCheung1

@InvisibleOne it doesn't update the clicks per second