原题链接 思路: 用一个数保存进制,从后往前不断pop出两个数字和进制数相加,放入返回值中. var addBinary = function(a, b) { var arrA = a.split(''); var arrB = b.split(''); var len = Math.max(a.length, b.length), c = 0, result = ''; while(len-- > 0 || c > 0) { let va = arrA.pop(); let vb = arr…