[jQuery] A simple .each() function question

[jQuery] A simple .each() function question


I'm a noob trying to get a better understanding of Jquery and have a
simple question about the each() function.
$("li").click(function () {
$("li").each(function(){
$(this).toggleClass("example");
});
});
$("li").click(function () {
$("li").toggleClass("example");
});
What is the added value of using each() in the top example when the
bottom example does the job just fine. Why would you want to use each?