const n = '101'; const r = parseInt(n, 2); // 5
const n = 5; const r = n.toString(2); // 101
Last updated 1 year ago