题解 | #二进制转换#
二进制转换
https://www.nowcoder.com/practice/7b74386695cc48349af37196f45e62a8
function convertToBinary(num) {
let result = num.toString(2)
while(result.length < 8){
result = '0' + result
}
return result
}
let result = num.toString(2)
while(result.length < 8){
result = '0' + result
}
return result
}