I have an array:
var array = ["0CS", "0CR", "1CR", "1AR"]
And I want to remove the numbers from each of the strings so it becomes:
["CS","CR","CR","AR"]
Is there a more efficient approach than this (purely in JS)?
var noNumberArray = []
for(var item in array){
noNumberArray.push(array[item].replace(/\d+/,""));
}
array = noNumberArray;