-2

I am absolutely new in JavaScript and I have some doubt about how to do the following thing:

Into a JavaScript function I have to perform an operation after that are passed 30 seconds. How can I do it?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596

2 Answers2

1
setTimeout(function()
{
 // your code
},30000)
satchcoder
  • 797
  • 5
  • 11
1

You have to use window.setTimeout

sbaglieri
  • 319
  • 2
  • 10