Answers for "text to binary converter js"

1

converting binary to text js

function binaryAgent(str) {

var newBin = str.split(" ");
var binCode = [];

for (i = 0; i < newBin.length; i++) {
    binCode.push(String.fromCharCode(parseInt(newBin[i], 2)));
  }
return binCode.join("");
}
binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100');
//translates to "Aren't"
Posted by: Guest on October-21-2020
0

string to binary javascript

let num = 2020;
let x = +num.toString(2);
console.log(x);
Posted by: Guest on June-29-2020

Code answers related to "text to binary converter js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language