Despite the fact that Anne begins as a lonely orphan, the general mood of her story is lighthearted and optimistic. The story often presents challenges that characters must overcome in order to develop their moral character. Most of the story's characters meet challenges with persistence, kindness, and optimism. For example, the Cuthberts are initially disappointed to receive a girl orphan (rather than a boy), but when they learn of Anne's past, they display great empathy and decide to adopt her. In Chapter 8, Marilla decides to keep Anne:
For reasons best known to herself, Marilla did not tell Anne that she was to stay at Green Gables until the next afternoon. During the forenoon she kept the child busy with various tasks and watched over her with a keen eye while she did them. By noon she had concluded that Anne was smart and obedient, willing to work and quick to learn[...]
Here, Marilla muses about her decision to let Anne stay. She has recovered from her shock at receiving a female orphan, and Anne's sadness at not being able to stay will soon be turned into happiness at the prospect of growing up at Green Gables. Given that Anne is "willing to work" and "quick to learn," she seems like a good fit for Green Gables despite the unexpected surprise that she was a girl.
Another example of an unlikely optimistic turn appears near the end of the story when Matthew suddenly dies of a heart attack. Anne wrestles with the decision of whether to stay at Avonlea to care for the grieving woman or to accept the Redmond scholarship. She decides to stay at home, and Gilbert kindly gives up his own position at the local school so she can stay near her family's home. In the final few chapters, both Anne and Gilbert make personal sacrifices to care for others and end up becoming good friends. This subplot suggests that even the most bitter rivals can mature into amiable allies.
Despite facing significant challenges, the characters in Anne of Green Gables manage to persevere and treat each other with kindness. The language used to describe their triumphs gives the story a sense of optimism and positivity. And the story's pattern of success in facing challenges strengthens the reader's belief in the characters' ultimate success in finding happiness.