And when Joseph reached maturity, We gave him judgment and knowledge. And thus We reward the doers of good.
The Saheeh International Quran Translation
وَلَمَّا بَلَغَ أَشُدَّهُۥٓ ءَاتَيْنَٰهُ حُكْمًا وَعِلْمًا وَكَذَٰلِكَ نَجْزِى ٱلْمُحْسِنِينَAnd when Joseph reached maturity, We gave him judgment and knowledge. And thus We reward the doers of good.