Kennedy served at the height of the Cold War, and the majority of his work as president concerned relations with the Soviet Union and Cuba. A Democrat, Kennedy represented Massachusetts in the U.S. House of Representatives and Senate prior to becoming president. He graduated from Harvard University in 1940, before joining the U.S. Naval Reserve the following year. In the 1960 presidential election, he narrowly defeated Republican opponent Richard Nixon, who was the incumbent vice president. In 1960, Kennedy stated, 'Israel will endure and flourish. It is the child of hope and the home of the brave. It can neither be broken by adversity nor demoralized by success.