编辑代码

const num = 7;
console.log(num.toString(2));