title: How to get subarray from array?
body: <p>I have <code>var ar = [1, 2, 3, 4, 5]</code> and want some function <code>getSubarray(array, fromIndex, toIndex)</code>, that result of call <code>getSubarray(ar, 1, 3)</code> is new array <code>[2, 3, 4]</code>.</p>