What is an example of irony in literature?

An example of irony in literature is in O. Henry’s “The Gift of the Magi,” where Jim and Della each sacrifice their most prized possession to buy a gift for the other: Della sells her hair for a chain, and Jim sells his watch for combs.

The situational irony lies in the fact that Jim and Della’s well-intentioned sacrifices make their gifts useless. This irony highlights the idea that the true value of gifts lies in the love and sacrifice they represent.