I would like to ask if it is possible to trim the length of multiple strings in an array in javascript. The length of each string of my array is different, however I would like to trim the last 2 digit (meaning trimming "-2") for each of them.
var array = ["517577144-2","503222534-2","100003527692828-2","654703438-2","4205501-2"]
Cheers, Karen