WD interview question

Multiple questions on string manipulation and arrays