Judges 3:2

2 only that the generations of the children of Israel might know war by learning it, at the least those who before had known nothing thereof:

Judges 3:2 In-Context

1 And these are the nations that Jehovah left, to prove Israel by them, all that had not known all the wars of Canaan;
2 only that the generations of the children of Israel might know war by learning it, at the least those who before had known nothing thereof:
3 five lord ships of the Philistines, and all the Canaanites, and the Sidonians, and the Hivites that dwell on mount Lebanon; from mount Baal-Hermon unto the entering into Hamath.
4 And they were to prove Israel by them, to know whether they would obey the commandments of Jehovah, which he commanded their fathers by the hand of Moses.
5 And the children of Israel dwelt among the Canaanites: Hittites and Amorites and Perizzites and Hivites and Jebusites;
The Darby Translation is in the public domain.