title: not able to write each in function class
body: <p>i am not able to write   each function class
  whenever i write following things , it's give me error why?</p>
  
  <pre><code>&lt;script&gt;
          var addLi = function($li) {
              var $uls = $('ul');
              $.each($uls, function(index, ul) {
                  // If this ul has less than 5 li's
                  // then add the li here
                  if ($(this).find('li').length &lt; 5) {
                      $(this).append($li);
                      // exit the for loop since we have placed this li
                      return;  
                  }
              }
              };
      &lt;/script&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/FCg5S.png" alt="enter image description here"></p>