请教下大家如何得到tbody下最后一个<tr id="req_people_journey_item3_1">的下标,谢谢!

图片说明
请教下大家如何得到

最后一个下标1呢,谢谢!
//获取最后一个tr对象
var tr=document.querySelector("table > tbody > tr:last-of-type");
//想干啥都行了
//比如获取Tr的id
console.log(tr.id);
//获取id最后面的数字
console.log(tr.id.slice(-1));