(CNN) Rep. Alexandria Ocasio-Cortez thanked Sen. Bernie Sanders for coming to her defense on Friday after former Vice President Joe Biden told CNN that she did not represent Democrats who could win competitive general elections.

Sanders took a swipe at Biden, after the former vice president defended his commitment to moderation in a crowded Democratic field during an interview with CNN's Chris Cuomo that aired Friday morning.

Sanders pointed to "Medicare for All" and Ocasio-Cortez's trademark Green New Deal environmental protection plan as "the agenda America needs" that would also unite voters against President Donald Trump.

"I'm proud to be working with @AOC and so many other Democrats to pass Medicare for All, debt free college and a Green New Deal," Sanders tweeted later Friday in response to Biden's comments. "This is the agenda America needs — and that will energize voters to defeat Donald Trump."

The New York Democrat replied on Twitter, "Thank you, @SenSanders. It's an honor to work alongside you and the millions of other people fighting for education, healthcare, and a living wage as rights."

The New York congresswoman and Vermont senator have partnered on progressive issues before, including legislation to cap credit card interest rates at 15% and campaigning together for other progressive hopefuls ahead of the midterm elections. Ocasio-Cortez also appeared at a climate change panel Sanders hosted late last year.

In his interview with Cuomo, Biden said Ocasio-Cortez doesn't represent voters across the country and candidates like her aren't likely to win in races in more purple districts.

"Look who won the races. Look who won last time out," Biden said. "By the way, I think Ocasio-Cortez is a brilliant, bright woman, but she won a primary. In the general election fights, who won? Mainstream Democrats who are very progressive on social issues and very strong on education and healthcare."

Biden also implied that Medicare for All is irrational, arguing that the majority of Democrats are "center left" not "way left."