In "The Celebrated Jumping Frog of Calaveras County" by Mark Twain, the ending is ironic because the narrator goes to hear a fun story about a frog-jumping contest but gets tricked instead. He listens to Simon Wheeler's long story about Jim Smiley and his gambling but ends up feeling confused and frustrated.
The twist comes when the narrator realizes the experience is more about the strange people in the camp and their silly tales than about the frog or the contest. The irony shows the difference between what he expected and what actually happened, which reflects Twain's ideas about storytelling and gambling, as well as the unpredictability of life.