You’re calling the function immediately and scheduling its return value.
Use:
setTimeout(testFunction, 2000);
^
Notice: no parens.
You’re calling the function immediately and scheduling its return value.
Use:
setTimeout(testFunction, 2000);
^
Notice: no parens.