Datatables limit selected columns

i’m trying to extend datatables select column code to select only five columns and no more but i can’t find it anywhere so i ask if someone know how to extend this javascript code to select only five columns:
Javascript datatables select column
I hope it would be simple and no much hard but I really don’t know how to do it. Thanks for possible help.