tag:blogger.com,1999:blog-35897879.post4072308294699691202..comments2023-11-02T21:16:09.308+11:00Comments on Java-Success Blog: JavaScript Interview Questions and Answers: Function.call, Function.apply, and Callback functionsAnonymoushttp://www.blogger.com/profile/00869496028596976417noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-35897879.post-40407550181438766492012-10-02T10:14:37.884+10:002012-10-02T10:14:37.884+10:00function test(){
setTimeout(myobj1.myfunction, 10...function test(){<br /> setTimeout(myobj1.myfunction, 1000);<br />}<br /><br />A. The output in the alert will be "x is not defined". This is because the "this" will be referring to the default global object -- window. The above code can be fixed by replacing the test() function as shown below.<br /><br />function test(){<br /> setTimeout(function(){<br /> myobj1.myfunction()}Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35897879.post-21464602869438901962012-08-06T15:30:39.320+10:002012-08-06T15:30:39.320+10:00here i have collected lots of JavaScript Interview...here i have collected lots of <a href="http://www.questions-interviews.com/world-wide-web/javascript.aspx" rel="nofollow">JavaScript Interview Questions and Answers</a><br /><br />kindly have a look this would help you a lot<br /><br />Regards,<br /><br />Akaas Developer<br /><br /><a href="http://www.questions-interviews.com/" rel="nofollow">questions-interviews.com</a>Akaas Developerhttps://www.blogger.com/profile/00241569474513838908noreply@blogger.com