code: function getCommonLastItems(arr1, arr2, butFirsts) {
    var n = Math.min(arr1.length, arr2.length) - (butFirsts || 0);
  
    return [arr1.slice(-n), arr2.slice(-n)];
  }
docs: ===================================================================