Who knows what is your
f
? Anyway, this is some object which does not have this method, that's it. Instead of asking such question, ask yourself why do you think that the function
slice
is defined in
f
. And then have it defined or use the object which has this function.
Chances are, you want to work with the array object which is defined for array objects and selects a range of elements of an array:
http://www.w3schools.com/jsref/jsref_slice_array.asp[
^].
If this is what you need, you problem is that
f
is not an array. Trivial, yes, but this is all one can see from your question.
—SA