Check if all array elements can be removed by the given operations | Function to check if it is possible to remove all array elements ; Condition if we can remove all elements from the array ; Driver Code
function removeAll ( arr , n ) { if ( arr [ 0 ] < arr [ n - 1 ] ) document . write ( " " ) ; else document . write ( " " ) ; } let Arr = [ 10 , 4 , 7 , 1 , 3 , 6 ] ; let size = Arr . length ; removeAll ( Arr , size ) ;