To be specific: Let consider this array -
var strings = ['John', 'Jane', 'Mary'];
Now the question is how can I add something to that existing element in array like I want to append |Teacher
in John
so that it would be John|Teacher
.
So altogether, I want is -
var strings = ['John|Teacher', 'Jane|Doctor', 'Mary|Housekeeper'];
How can I do this? Please help.