Elance Exams Answers PDF file

-- PDF FILE --
Download PDF file of elance Zoho Creator Exam Answers
elance-zoho-creator-exam.pdf

for the following code: function foo() { var funcs = []; for (var i = 0; i < 10; i++) { funcs.push(function () { alert('value of i is ' + i); }); } return funcs; } var funcs = foo(); funcs[0](); what will be alerted?

throws an error: you can't push functions into an array like that
value of i is 0
value of i is 10
value of i is 9
throws an error, i is no longer available when funcs[0] is called
Top
  • Follows us our servcies
  • Facebook icon
  • Linkedin icon
  • twitter icon
  • rss icon
  • social icon