javascript select first n elements from array 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']