Yahya was told to hold firmly to the Scripture and was given judgment while still a boy.
Qur'an: 'O Yahya, take the Scripture with determination.' And We gave him judgment while yet a boy, and tenderness from Us, and purity, and he was righteous (19:12–13).
Qur'an: 'And dutiful to his parents, and he was not a disobedient tyrant. And peace be upon him the day he was born, the day he dies, and the day he is raised alive' (19:14–15).