📌  相关文章
📜  javascript 将数字转换为二进制 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:19.498000             🧑  作者: Mango

代码示例3
/* From decimal to binary (similar fo rother base) */
const num = 7;
num.toString(2); // output: "111"

/* From binary (similar fo rother base) to decimal */
parseInt("111", 2); // output: 7