Here you can find the source of fromBinary()
// Method to decode a string of bits // '1010011 1100101 1110100 1101000'.fromBinary(); returns 'Seth' String.prototype.fromBinary = function() { for (var bits = this.split(' '), i = 0, $ = '', b; b = bits[i]; i++) $ += String.fromCharCode('0b' + b); return $;//from w w w. j a v a2s .c om };
String.prototype.fromBinary = function(){ var ret = ''; for (var i = 0; i < this.length; i++) { ret += String.fromCharCode(parseInt(this.charAt(i))); return ret;