At tonight’s GOP debate, Donald Trump is fighting a two-front war.

Megyn Kelly showed Trump a long video of his shifting foreign policy positions on the wars in Afghanistan and Iraq and on Syrian refugees. Actually, “shifting positions” understates the case—in each instance, Fox showed videos of Trump making a bombastic claim, then reversing his position. 

Trump’s answer was mostly Palin-esque word salad, but it was still telling. Trump essentially acknowledged the flip-flopping, telling Kelly that he’s flexible and that when he better understood these issues, he changed his position: “I’ve never seen a successful person who wasn’t flexible, who didn’t have a certain degree of flexibility. ... You have to be flexible, because you learn.” He did something similar earlier in this debate when he changed his position on immigration, saying he would admit highly skilled workers: “I’m changing. We need highly skilled people in this country. And if we can’t do it, we’ll bring them in.” 

This strategy allows Trump to play defense and offense simultaneously. On the one hand, it insulates him from charge of hypocrisy. On the other hand, it allows him to pivot toward the general election by putting a more open, presidential face on what has been a demagogic primary campaign. Trump’s “flexibility” allows him to fight his primary opponents while courting general election voters at the same time.