I have an array like this: array = ["apple","orange","pear"] I want to remove the double quotes from the beginning and end of each one of the strings in the array. array = [apple,orange,pear] I tried to loop through each element of the array and did a string replace like the following
for (var i = 0; i < array.length; i++) {
array[i] = array[i].replace(/"/g, "");
}
But it did not remove the double quotes from the beginning and end of the string. Any help would be appreciated.Thanks much.