Why a function cannot be called in row-reordered event?
Why a function cannot be called in row-reordered event?

My objective is want to call a function inside row-reordered event but it would not be happen. How to call a function inside it after the event triggered?
var table2 = $('#routeTable').DataTable({});
table2.on( 'row-reordered', function ( e, diff, edit ){
var result = [];
var tableData = table2.data().toArray();
for (var i=0 ; i<tableData.length ; i++) {...}
console.log(result);
myfunction(result);
});
This discussion has been closed.
Answers
Yep, no reason why you can't call a function. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin