Break out of rows().every() loop

Break out of rows().every() loop

rf1234rf1234 Posts: 2,806Questions: 85Answers: 406

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,142Questions: 1Answers: 2,586

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

    Colin

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765
    Answer ✓

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

    Kevin

  • rf1234rf1234 Posts: 2,806Questions: 85Answers: 406

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

    Many thanks, Kevin!

This discussion has been closed.