Run three nested loops each loop for each element of triplet
for ( let i = 0 ; i < arr . length ; i ++ ) { for ( let j = i + 1 ; j < arr . length ; j ++ ) { for ( let k = j + 1 ; k < arr . length ; k ++ ) {