text: Driver program to test above function .
code: var arr = [ 1291 , 897 , 4566 , 1232 , 80 , 700 ] var n = arr . length ; for ( var i = 0 ; i < n ; i ++ ) isLucky ( arr [ i ] ) ? document . write ( arr [ i ] + " " ) : document . write ( arr [ i ] + " " ) ;