I'm a beginner in javascript. I need to add one function in my web application, in this function in I have added one task. this task depends on a timer, after 35 seconds it will be automatically started. but the thing is if the user doesn't want to wait for 35 seconds then it will be starting before 35 seconds. user clicks on the start button to call function and it will be task start.
if the user waits for 35 seconds then the task will be an automatic start.
This is my function
setTimeout(
function hello() {
console.log('Hello User')
}, 35000);
<button onclick="hello()">Click me to start</button>
this code is work but the user clicks on the start button to call function. then after 35 seconds to repeatedly automatically task starts.