If a unique combination is found
if ( sum == K ) { document . write ( " " ) ; for ( let i = 0 ; i < local . length ; i ++ ) { if ( i != 0 ) document . write ( " " ) ; document . write ( local [ i ] ) ; if ( i != local . length - 1 ) document . write ( " " ) ; } document . write ( " " + " " ) ; return ; }