Triangular Matchstick Number | javascript program to find X - th triangular matchstick number ; Driver code
function numberOfSticks ( x ) { return ( 3 * x * ( x + 1 ) ) / 2 ; } document . write ( numberOfSticks ( 7 ) ) ;