select first n elements of list js code example
Example: javascript select first n elements from array
const array = ['toto','tata','titi','tutu'];
array.slice(0, 2); // => ['toto','tata']
const array = ['toto','tata','titi','tutu'];
array.slice(0, 2); // => ['toto','tata']