Moses told Joshua that Yahweh would go before Joshua, be with him and Yahweh would not fail or abandon Joshua so Joshua should not be afraid or discouraged.