User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0
The error is only showing itself when I do npm start in VScode but it works fine on codepen as seen here **It even passes the whole test on codepen **
But it doesnt display when I do npm start.
Can anyone help me solve the issue?
Not sure why code pen does it. It might have something to do with the pre-processing text entered in code pen boxes, but it is not a valid assignment or a function call. It evaluates or equals the timer id returned by the setTimeout() function.
You would need to use the useCallback() hook if you wanted to have the stay along Clock() function, and you would want to use the useRef() hook to keep track of your current timer id.