Maximum points of intersection n lines | nC2 = ( n ) * ( n - 1 ) / 2 ; ; n is number of line
function countMaxIntersect ( n ) { return ( n ) * ( n - 1 ) / 2 ; } var n = 8 ; document . write ( countMaxIntersect ( n ) ) ;