My tech blog
My tech blog
Thursday, 19 April 2012
About setTimeout
Never give either
setTimeout
or
setInterval
a string containing code; instead, give it an actual function reference. Otherwise, it won't work.
function
foo
()
{
display
(
"Hi there"
);
}
setTimeout
(
foo
,
500
);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment