You can use array.slice and array.join
const array = ["john", "mark", "sally", "adam", "rick"]
const newArray = array.slice(0, 3);
console.log(newArray);
const newString = newArray.join('');
console.log(newString);
solved create a new array from an existing array at specific indexes