Say I have the following array:
var questions = ["Is he great?", "Is he nice?", "Is he wonderful?"]
How can I alter it so that if I call any element from this array, the 'he' is substituted for 'she'? I've tried map, but this only seems to work for individual elements, and not parts of an element. Slicing is also only inter-element, and replaceOccurrence creates a new string, but doesn't alter the original. Ideally I'd like to write:
print(questions[0])
and get: "Is she great?" for any element in the array containing 'he' without having to create a whole new array. TIA.