﴿وَلَمَّا بَلَغَ أَشُدَّهُ آتَيْنَاهُ حُكْمًا وَعِلْمًا ۚ وَكَذَٰلِكَ نَجْزِي الْمُحْسِنِينَ﴾ (22) And when he [i.e., Joseph] reached maturity, We gave him judgement and knowledge. And thus We reward the doers of good.