Implement a function that adds two numbers together and returns their sum in binary. The conversion can be done before, or after the addition.
My code:
function addBinary(a,b) {
let sum = a+b;
let binary = sum.toString(2);
return binary;
}
function addBinary(a,b){
return (a+b).toString(2)
}