MCQs > IT & Programming > JQuery > Consider the following code snippet: $(document).ready(function() { $('div').each(function(index) { alert(this); }); }); Which of the following objects does the 'this' variable refer to?

JQuery MCQs

Consider the following code snippet:

$(document).ready(function() {

    $('div').each(function(index) {

        alert(this);

    });

});

Which of the following objects does the 'this' variable refer to? 

Answer

Correct Answer: The current div tag of the iteration.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JQuery Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JQuery Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it