Here I want show only 10 items. How can break if counter == 10 ?
- var counter = 1;
- $("#update").click(function() {
- var btnView = 'View';
- $('#clearbtn-' + (count - 1)).append(btnView);
- counter++;
- });
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Shakti Singh DulawatRank #668 · 3.6K reputationPosted Apr 12, 2017, 12:21 AM EDT
To
breakaloop, you have to returnfalsein the loop callback.Returning
trueskips to the next iteration, equivalent to acontinuein a normal loop.Midhun TpRank #388 · 6.5K reputationPosted Apr 12, 2017, 1:24 AM EDT
Abhilash J ARank #1,243 · 1.4K reputationPosted Apr 12, 2017, 1:29 AM EDT
Ranjeet PatraRank #1,436 · 1.1K reputationPosted Apr 12, 2017, 1:39 AM EDT