"Surprise LA! @DDLovato thank you for having me," the former Jonas Brothers member, 25, tweeted. "Tonight was amazing. Fun keeping this a secret."
Lovato, 22, Instagrammed a photo from the performance, writing: "Thanks @joejonas for the awesome surprise!! #staplescenter #4yrssincewesangtogether #demiworldtour."
These two weren't just co-stars -- Lovato and Jonas also briefly dated. "I can fortunately say that him, and his brother Nick, have always been there for me and are literally family, and like brothers," Lovato told ABC's Nightline. "We have a great friendship."