Daniel 1:8-21 ESV
But Daniel resolved that he would not defile himself with the king’s food, or with the wine that he drank. Therefore he asked the chief of the eunuchs to allow him not to defile himself. And God gave Daniel favor and compassion in the sight of the chief of the eunuchs, and the chief of the eunuchs said to Daniel, “I fear my lord the king, who assigned your food and your drink; for why should he see that you were in worse condition than the youths who are of your own age? So you would endanger my head with the king.” Then Daniel said to the steward whom the chief of the eunuchs had assigned over Daniel, Hananiah, Mishael, and Azariah, “Test your servants for ten days; let us be given vegetables to eat and water to drink. Then let our appearance and the appearance of the youths who eat the king’s food be observed by you, and deal with your servants according to what you see.” So he listened to them in this matter, and tested them for ten days. At the end of ten days it was seen that they were better in appearance and fatter in flesh than all the youths who ate the king’s food. So the steward took away their food and the wine they were to drink, and gave them vegetables.
As for these four youths, God gave them learning and skill in all literature and wisdom, and Daniel had understanding in all visions and dreams. At the end of the time, when the king had commanded that they should be brought in, the chief of the eunuchs brought them in before Nebuchadnezzar. And the king spoke with them, and among all of them none was found like Daniel, Hananiah, Mishael, and Azariah. Therefore they stood before the king. And in every matter of wisdom and understanding about which the king inquired of them, he found them ten times better than all the magicians and enchanters that were in all his kingdom. And Daniel was there until the first year of King Cyrus.
ESV: English Standard Version 2016