passing variables to datatable

passing variables to datatable

I am trying to send some variables to a datatable:

var notOrderable = "0";
var hidden = "0,2";
var sorted = "2";

$("#PlottablePersons").dataTable({
 scrollY: 500,
        paging: true,
        searching: false,
        columnDefs:
            [
                { orderable: false, targets: [notOrderable] },
                { visible: false, targets: [hidden] }
            ]
        ,
        sorting: [sorted, "asc"]
});


This is not working!  So, firstly, is this the best way to do this?  Secondly with the columndefs and sorting be happy if they are passed empty variables?

Any helped or advice appreciated :)