Sarah Huckabee Sanders apologized late Thursday after she mocked comments by former Vice President Joseph R. Biden Jr. during the Democratic presidential debate in which he recounted mentoring a boy who had a speech impediment.

Ms. Sanders, the former White House press secretary, made the remarks on Twitter after Mr. Biden, who has been open about his stutter and his struggle with it since he was a child, described his interaction with the boy.

“The little kid who said: ‘I can’t talk. What do I do?’” Mr. Biden said, speaking haltingly over the “I” and “what” for emphasis.

Shortly after, Ms. Sanders tweeted, “I I I I I I I I I I I I I I I hhhave absolutely no idea what Biden is talking about.” The post has since been deleted.