This should remove the decimal after the last keyframe, and allow you to add multiple keyframes for pausing:
try{
var rA = [0,24,37,2,10,80,60,55,80,23]; // result Array
var cursor = thisComp.layer("cursor"); // layer you choose to animate the x axis position
var xPos = cursor.position[0];
var startPos = cursor.position.key(1).value[0];
var endPos = cursor.position.key(cursor.position.numKeys).value[0];
var aryN = linear(xPos,startPos,endPos,0,rA.length);
var aryNPrev = Math.floor(aryN);
var aryNNext = Math.ceil(aryN);
var txt = linear(aryN,aryNPrev,aryNNext,rA[aryNPrev],rA[aryNNext]);
txt.toFixed(0);
} catch (err){
rA[rA.length-1].toFixed(0)
}
Ah no worries dude. Happy to help!