How to use "elected" in a sentence

Sentences

Those who nominated and elected me did so with full knowledge that I had made this and many similar declarations, and had never recanted them

He was so popular that, in 1820, the townspeople elected him mayor of Montreuil.

Maybe he's still on the payroll of some spook shop, and maybe the whole plan was for him to pretend to retire and then get elected as a judge here in Vegas, so his bosses would have a friendly courtroom in town."

She won the "popular vote", which means that more of the Americans who voted, voted for her, but she was not elected.