The book of Numbers recounts the years that the Israelite spent between their arrival at Kadesh-barnea after
the exodus, to the time they assembled at Mt Nebo on the Plains of Moab, poised to conquer Canaan. The P and JE
sources differ as to where the Israelites spent their 40 years. Most of Numbers is attributed to the P source,
which locates the Israelites' lengthy misery in the northern Sinai, the wilderness of Zin,
near Kadesh-barnea. That would be due south of Canaan. The J and E fragments in Numbers say the
Israelites stayed a short time at Kadesh-barnea, and spent their 40 years in the desert regions of Edom and Moab,
east of the Dead Sea, and due east of Canaan.