const points = ["A", "B", "C"];
const sides = [];
for(let i = 0; i < points.length - 1; i++) {
const a = points[i];
for(let j = i+1; j < points.length; j++) {
const b = points[j];
if(a !== b) {
sides.push([a,b]);
}
}
}
console.log(sides);
// Выведет
//[ ["A", "B"], ["A", "C"], ["B", "C"] ]