javascript remove element from array

an alternative with splice

  
myServiceList.splice(
    0,
    myServiceList.length,
    ...myServiceList.filter((value) => value.name && value.name.length > 0)
  );

Leave a comment