how to select first 3 elements from js 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']