learn by example:
let array_1 = [1,2,3,4];
let array_2 = [1,2,3,4];
let array_3 = [1,2,3,4];
array_1.splice(-1,1) // output --> [4] array_1 = [1,2,3]
array_2.slice(0,-1); // output --> [1,2,3] array_2 = [1,2,3,4]
array_3.pop(); // output --> 4 array_3 = [1,2,3]