So if you want to get the first n number of items from Array then pass starting index 0 and stop index value what you want.
Example of getting the first N number of elements from an array
In this example original array is not modified in this operation.
var num = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
Do comment if you have other way to do it or have any doubts on this question.
Note: The All JS Examples codes are tested on the Safari browser (Version 12.0.2) and Chrome.
OS: macOS 10.14 Mojave
Code: HTML 5 Version