Read this and answer the question

The final major aspect of identity formation is self-esteem. Self-esteem is defined as one's thoughts and feelings about one's self-concept and identity. Most theories on self-esteem state that there is a grand desire, across all genders and ages, to maintain, protect and enhance their self-esteem. Contrary to popular belief, there is no empirical evidence for a significant drop in self-esteem over the course of adolescence. "Barometric self-esteem" fluctuates rapidly and can cause severe distress and anxiety, but baseline self-esteem remains highly stable across adolescence. The validity of global self-esteem scales has been questioned, and many suggest that more specific scales might reveal more about the adolescent experience. Girls are most likely to enjoy high self-esteem when engaged in supportive relationships with friends, the most important function of friendship to them is having someone who can provide social and moral support. When they fail to win friends' approval or couldn't find someone with whom to share common activities and common interests, in these cases, girls suffer from low self-esteem. In contrast, boys are more concerned with establishing and asserting their independence and defining their relation to authority. As such, they are more likely to derive high self-esteem from their ability to successfully influence their friends; on the other hand, the lack of romantic competence, for example, failure to win or maintain the affection of the opposite or same-sex (depending on sexual orientation), is the major contributor to low self-esteem in adolescent boys. Due to the fact that both men and women happen to have a low self-esteem after ending a romantic relationship, they are prone to other symptoms that is caused by this state. Depression and hopelessness are only two of the various symptoms and it is said that women are twice as likely to experience depression and men are three to four times more likely to commit suicide (Mearns, 1991; Ustun & Sartorius, 1995).

What is the most important function of friendship?
having someone who can provide social and moral support