不出意外的話,我一定是沒看清楚題意
https://jsfiddle.net/japhenchen/L4zym25k/3/
var a = [1,2,3,4,5,'a','BBB','CCCC','d','Ee'];
var b =a.indexOf( 5)+1; // 找 5
var c = a.splice(b,3); // 把5之後的3個值抓出來
document.write("<table>");
c.forEach(function(d){
document.write( `<tr><td>${d}</td></tr>`);
});
document.write("</table>");