There are several ways to find out
1. Look on the build sheet
2. Look on the diff housing, it is usually stamped somewhere
3. Look on the ring gear. The number of teeth of the ring and pinion gears on stamped on it
4. Jack up the rear of the Jeep, spin the driveshaft and count how many turns the driveshaft makes for one turn on the tire.
Generally, all 4 bangers including YJs and TJs were 4.10s, except for the newer TJs that can with the 2.4L - 4cyl.