Why is the method executed immediately when I use setTimeout? [duplicate]


I'm trying to write a simple code with a setTimeout, but the setTimeout just won't wait the time it's supposes to and the code execute immediately. What am I doing wrong?

setTimeout(testfunction(), 2000);