Avatar

Level 10

Can anyone help on the setTimeOut() function?

I'm writing the code app.setTimeOut("app.alert('hello')",2000)  which works correctly;

but the following code doesn't works..

app.setTimeOut("sayHello()",2000);

function sayHello()

{

     app.alert('hello');

}

May i know where i'm doing mistake?

Thanks,

Nith