Break out of rows().every() loop

Break out of rows().every() loop

rf1234rf1234 Posts: 2,990Questions: 87Answers: 421

Is there a way to break out of a rows().every() loop?
https://datatables.net/reference/api/rows().every()

I tried a few things but nothing worked. And I also found this in the description:

No return value is expected or acted upon.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    No, it's similar to the JS forEach(), so no way to break I'm afraid.

    Colin

  • kthorngrenkthorngren Posts: 21,327Questions: 26Answers: 4,949
    Answer ✓

    You can try the not so pretty technique described in the SO thread.

    Kevin

  • rf1234rf1234 Posts: 2,990Questions: 87Answers: 421

    It's not so pretty, but works :smile:

    Many thanks, Kevin!

This discussion has been closed.