Answers for "js array select first 10"

2

javascript select first n elements from array

const array = ['toto','tata','titi','tutu'];

array.slice(0, 2); // => ['toto','tata']
Posted by: Guest on March-08-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language