John had a 10–10 record his first year back from the surgery. In 1977, John had his first career 20-win season, going 20–7 with a 2.78 ERA as the Dodgers won the NL West and reached the 1977 World Series. He helped the Dodgers return to the World Series in 1978 with a 17–10 record before leaving for the Yankees as a free agent. With the Yankees, John posted 20-win seasons in 1979 and 1980; he was an All-Star in those years as well as in 1978, his final year with the Dodgers. He appeared in three World Series contested between the Dodgers and Yankees, his only World Series appearances, and pitched for the losing team in all three. He was traded to the California Angels in 1982, for whom he made two starts in the AL Championship Series. He remained with the team until 1985, when he was released, though he spent the second half of the season pitching for the Oakland Athletics. Unsigned to begin 1986, it appeared that John's career might be over, but injuries to Yankee pitchers prompted New York to re-sign him. John won 13 games for the Yankees in 1987, then became the oldest player in baseball in 1988 following Phil Niekro's retirement. In 1989, he tied Deacon McGuire's record for most seasons pitched (26, later broken by Nolan Ryan) before retiring.