Javascript
\nvar findComplement = function(num) {\n    var number = num.toString(2);\n    var str = \'\';\n    for(let i of number) {\n        str += +!(i-0);\n    }\n    
```\nvar findComplement = function(num) {\n    var number = num.toString(2);\n    var str = \'\';\n    for(let i of number) {\n        str += +!(i-0);\n    }\n    return parseInt(str, 2)\n};\n```
[]