Easy to understand JavaScript solution (reduce)
\tvar modifyString = function(s) {\n\t\tconst getChar = (num, left, right) => {\n\t\t\tconst char = String.fromCharCode(num);\n\t\t\treturn char === left || cha
\tvar modifyString = function(s) {\n\t\tconst getChar = (num, left, right) => {\n\t\t\tconst char = String.fromCharCode(num);\n\t\t\treturn char === left || char === right ? getChar(++num, left, right) : char;\n\t\t};\n\n\t\treturn [...s].reduce((acc, curr, index) => {\n\t\t\tif (curr === \'?\') {\n\t\t\t\tconst checkLeft = acc[index - 1];\n\t\t\t\tconst checkRight = acc[index + 1];\n\t\t\t\tconst char = getChar(97, checkLeft, checkRight);\n\t\t\t\tacc = acc.substr(0, index) + char + acc.substr(index + 1);\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, s);\n\t};
['JavaScript']