JavaScript - JS
\n/**\n * @param {string} palindrome\n * @return {string}\n */\nvar breakPalindrome = function (palindrome) {\n  let result = palindrome.split("");\n\n  for (le
```\n/**\n * @param {string} palindrome\n * @return {string}\n */\nvar breakPalindrome = function (palindrome) {\n  let result = palindrome.split("");\n\n  for (let i = 0; i < Math.floor(result.length / 2); i++) {\n    if (result[i] !== "a") {\n      result[i] = "a";\n      return result.join("");\n    }\n  }\n\n  if (result.length === 1) {\n    return "";\n  } else {\n    result[result.length - 1] = "b";\n    return result.join("");\n  }\n};\n```
['JavaScript']