I have problem in getting the solution for this question :
Given a list of strings, return a list where each string has "y" added at its start and end.
moreY(["a", "b", "c"]) → ["yay", "yby", "ycy"]
moreY(["hello", "there"]) → ["yhelloy", "ytherey"]
moreY(["yay"]) → ["yyayy"]
And here's my attempt so far :
I am stuck as I can't define a Sting first and then using index of before using sub
string...
Am not I trying hard enough ?
Hope someone can give me some hints...
Tks.