Function to check if the sum of the digits till the mid of the array and the sum of the digits from mid till n is the same , if they are same then print that binary
function checkforsum ( a , n ) { let sum1 = 0 ; let sum2 = 0 ; let mid = parseInt ( n / 2 ) ;