input: def translate_code(code: str, language: str) -> str:
      """ Translate the given code to a specified programming language.
      The code is currently written in JavaScript. The output should be the equivalent code in the specified language.
      >>> translate_code("let arr = [1, 2, 3, 4, 5];\\n\\narr.forEach(item => {\\n console.log(item * 2);\\n});", "Python")
      'arr = [1, 2, 3, 4, 5]\\n\\nfor item in arr:\\n print(item * 2)'
      >>> translate_code("let arr = [1, 2, 3, 4, 5];\\n\\narr.forEach(item => {\\n console.log(item * 2);\\n});", "Java")
      'int[] arr = {1, 2, 3, 4, 5};\\n\\nfor (int item : arr) {\\n System.out.println(item * 2);\\n}'
      """
output:     if language == "Python":
          return code.replace("let arr = ", "arr = ").replace("arr.forEach(item => {\n console.log(item * 2);\n});", "for item in arr:\n print(item * 2)")
      elif language == "Java":
          return code.replace("let arr = ", "int[] arr = {").replace("];\n\narr.forEach(item => {\n console.log(item * 2);\n});", "};\n\nfor (int item : arr) {\n System.out.println(item * 2);\n}")
      else:
          return "Unsupported language"