---
title: "Explain the each() function"  
description: "Explain the each() function"  
author: "AVADHESH PATEL"  
published: 2012-12-06  
updated: 2020-09-20  
canonical: https://www.mindstick.com/interview/1587/explain-the-each-function  
category: "jquery"  
tags: ["jquery"]  
reading_time: 1 minute  

---

# Explain the each() function

$("#num").click(function(){\
$("li").each(function(){\
document.write($(this).text())\
});\
});

## Answers

### Answer by AVADHESH PATEL

$("#num").click(function(){\
$("li").each(function(){\
document.write($(this).text())\
});\
});


---

Original Source: https://www.mindstick.com/interview/1587/explain-the-each-function

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
