Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Binary Agents

const binaryAgent = str => {
  let string = ''
  str.split(' ').forEach(elem => {
    // Converts binary numbers to base 2
    const toBase = Number.parseInt(elem, 2)
    // Then convert the ASCII code which is now (toBase) to unicode 
    string += String.fromCharCode(toBase)
  });
  
  return string
}

binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111");

// With love @kouqhar
Comment

PREVIOUS NEXT
Code Example
Javascript :: video in react native stack overflow 
Javascript :: angular decode url 
Javascript :: get page link angular 
Javascript :: jquery version how 
Javascript :: Vue use props in style 
Javascript :: set timeout javascript 
Javascript :: Navbar Componet Nextjs 
Javascript :: angular serve 
Javascript :: vue watch object member 
Javascript :: javascript date pipe central timezone example 
Javascript :: add char in specific index stirng javascript 
Javascript :: on click jqueyr 
Javascript :: javascript push array into array 
Javascript :: last element of array js 
Javascript :: detect emoji in string javascript 
Javascript :: javascript map Removing Elements 
Javascript :: nestjs version 
Javascript :: sum of array elements in javascript 
Javascript :: swap key value object javascript 
Javascript :: js insert emoji 
Javascript :: javascript get elements that exist in two arrays 
Javascript :: get input type js 
Javascript :: two digit js' 
Javascript :: javascript remove last element from array 
Javascript :: jquery selector partial class name 
Javascript :: how to change color of font in js 
Javascript :: count number of duplicate pairs in array javascript 
Javascript :: expressjs path optional parameters 
Javascript :: javascript find all odd between two numbers 
Javascript :: how to check if a json object is empty 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =