In Chapter 6, d'Artagnan duels with Monsieur Bernajoux. Dumas uses hyperbole and verbal irony to describe d'Artagnan's comical hubris as he enters into this duel:
Bernajoux was not a man who needed to have such an invitation repeated twice to him. His sword flashed in the sunlight and he attacked vigorously, hoping that his adversary’s youth would let him be intimidated.
But d’Artagnan had served his apprenticeship the day before. Fresh from his victory and buoyed by his future favor, he was determined not to give an inch of ground.
The idea that d'Artagnan served an entire apprenticeship in one day is both hyperbolic and ironic. D'Artagnan is naive and really seems to believe that he has learned enough in one day to make him fit for this duel. It is probably an exaggeration to say that he thinks he completed a full apprenticeship, but the hyperbole gives the reader a sense of his overconfidence. Meanwhile, by stating that he "had served his apprenticeship the day before," Dumas highlights the opposite to the reader: d'Artagnan is woefully inexperienced. He has no idea, for instance, that Bernajoux is a renowned swordsman.
Funnily enough, this naivety serves him well in some ways. He does not know enough to be intimidated by Bernajoux's tactics, and sheer bravery helps him do remarkably well in the duel. This moment goes to show that d'Artagnan has a real knack for the work the musketeers do. At the same time, he is clearly not ready yet to serve alongside them as an equal. The "honorable" duel he fights with Bernajoux turns into a full-on brawl with the other musketeers he has offended. He is clearly in over his head and needs to adjust to the way class, status, and skill operate in Paris. Eventually, with a real apprenticeship, d'Artagnan promises to be a great musketeer. But as of now, his overconfidence is still getting him into trouble.
In Chapter 20, d'Artagnan knocks out a man the cardinal sent after him and then passes himself off as this man, Count de Wardes, at the office of the harbor master. D'Artagnan's exchange with the harbor master is marked by both verbal and dramatic irony:
“I see it’s perfectly in order.”
“Of course. The cardinal has great confidence in me.”
“It seems His Eminence wants to prevent someone from going to England.”
“Yes, a Gascon named d’Artagnan who left Paris with three of his friends, intending to go to London.”
“Do you know him personally?” asked the harbor master.
“Who?”
“That d’Artagnan.”
“Yes, I know him very well.”
“Then give me his description.”
“I’ll be glad to.”
And d’Artagnan gave a detailed description of Count de Wardes.
Conveniently for d'Artagnan, the letter Count de Wardes was bringing to the harbor master was an order from the cardinal to allow him to travel, even though the cardinal has ordered the harbor closed for everyone else. Handing this letter to the harbor master, who has never seen d'Artagnan or Count de Wardes in person, gives d'Artagnan the appearance of being in league with the cardinal. When he tells the harbor master, "The cardinal has great confidence in me," he has his tongue in his cheek; he is not lying exactly, but by neglecting to specify that the cardinal has great confidence in him to cause trouble, he lets the harbor master believe that the cardinal has instead trusted him with official business. When he states that he "know[s] [d'Artagnan] very well," he is likewise leading the harbor master in the opposite direction to what he really means. D'Artagnan does in fact know himself very well, but his phrasing drives the harbor master further away from suspecting that he is speaking to d'Artagnan himself.
D'Artagnan's indulgence in verbal irony demonstrates that he is having fun with this subterfuge. Not only does he use dramatic irony to his own advantage in this scene, but he also congratulates himself on his cleverness. While it may not seem very honorable for d'Artagnan to lie about his identity to the harbor master, he does so in service of a greater mission to help the queen and thwart the corrupt cardinal. His cleverness in carrying out that mission functions in the world of the novel as its own kind of honor.
In Chapter 39, d'Artagnan is summoned to two meetings—one with the cardinal and one with Madame Bonacieux. When he tells his friends that he trusts they will save him if the meeting with Madame Bonacieux turns out to be a trap, Porthos responds with verbal irony:
“But what if you end up in the Bastille?” asked Aramis.
“You’ll get me out,” replied d’Artagnan.
“Yes, of course,” Porthos said casually, as though rescuing someone from the Bastille were the simplest thing in the world, “but since we’re supposed to leave day after tomorrow, you’d better not take that chance.”
Porthos speaks, like d'Artagnan, as if it is obvious that the musketeers will simply break their young friend out of the Bastille if he finds himself there. The difference is that Porthos is implicitly making the opposite point: d'Artagnan is showing himself to be extremely naive by taking the possible consequences of a trap so lightly. Porthos is a good friend, but he does not want to be on the hook for saving d'Artagnan from his own careless mistakes. He makes a pointed understatement about the difficulty d'Artagnan is asking all of them to face by remarking that "since we're supposed to leave day after tomorrow, you'd better not take that chance." It is not only that it might take more than a day to stage a rescue. Moreover, the musketeers could face enormous consequences for breaking into the Bastille. They may even be executed if they are caught.
No one, including d'Artagnan, acknowledges Porthos's verbal irony, and the conversation moves on. Porthos does not seem too angry at d'Artagnan for his entitled assumption. Rather, he is serving his regular role as comic relief, rolling his eyes at d'Artagnan's youthful overconfidence and inviting the reader to do the same.