Judges 3:2

2 (he did this only to teach warfare to the descendants of the Israelites who had not had previous battle experience):

Judges 3:2 in Other Translations

KJV
2 Only that the generations of the children of Israel might know, to teach them war, at the least such as before knew nothing thereof;
ESV
2 It was only in order that the generations of the people of Israel might know war, to teach war to those who had not known it before.
NLT
2 He did this to teach warfare to generations of Israelites who had no experience in battle.
MSG
2 He did it to train the descendants of Israel, the ones who had no battle experience, in the art of war.
CSB
2 This was to teach the future generations of the Israelites [how to fight in] battle, especially those who had not fought before.

Judges 3:2 In-Context

1 These are the nations the LORD left to test all those Israelites who had not experienced any of the wars in Canaan
2 (he did this only to teach warfare to the descendants of the Israelites who had not had previous battle experience):
3 the five rulers of the Philistines, all the Canaanites, the Sidonians, and the Hivites living in the Lebanon mountains from Mount Baal Hermon to Lebo Hamath.
4 They were left to test the Israelites to see whether they would obey the LORD’s commands, which he had given their ancestors through Moses.
5 The Israelites lived among the Canaanites, Hittites, Amorites, Perizzites, Hivites and Jebusites.
Scripture quoted by permission.  Quotations designated (NIV) are from THE HOLY BIBLE: NEW INTERNATIONAL VERSION®.  NIV®.  Copyright © 1973, 1978, 1984, 2011 by Biblica.  All rights reserved worldwide.