See Deuteronomy 1:38.
"Yahweh enabled Joshua ... to be very wise"
"Moses had laid his hands on him to set Joshua apart so Joshua would serve Yahweh"