Driver code
var a = [ 2 , 7 , 8 , 10 , 15 ] ; var b = [ 1 , 6 , 7 , 8 ] ; var c = [ 4 , 5 , 5 ] ; var l1 = a . length ; var l2 = b . length ; var l3 = c . length ; var x = 14 ; if ( existsTriplet ( a , b , c , x , l1 , l2 , l3 ) ) document . write ( " " ) ; else document . write ( " " ) ;