Number of quadrilateral formed with N distinct points on circumference of Circle | Function to find the factorial of the given number N ; Loop to find the factorial of the given number ; Function to find the number of combinations in the N ; Driver Code ; Function Call
function fact ( n ) { let res = 1 ; for ( let i = 2 ; i < n + 1 ; i ++ ) res = res * i ; return res ; } function nCr ( n , r ) { return ( fact ( n ) / ( fact ( r ) * fact ( n - r ) ) ) ; } let n = 5 ; document . write ( nCr ( n , 4 ) ) ;