Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

binary agents freecodecamp

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 :: JS retrieve a String’s size 
Javascript :: js message timeout 
Javascript :: node command line input 
Javascript :: how to check consecutive characters in javascript 
Javascript :: javascript truncate array 
Javascript :: redirect with javascript 
Javascript :: javascript to string big number 
Javascript :: if else short term 
Javascript :: javascript sum of array 
Javascript :: get datetime yesterday angular 
Javascript :: javascript date pipe central timezone example 
Javascript :: limit characters display javascript 
Javascript :: search text in div jquery 
Javascript :: javascript combine dictionaries 
Javascript :: set view engine to ejs in express 
Javascript :: javascript is number even or odd 
Javascript :: material ui textfield change input color 
Javascript :: javascript check if required 
Javascript :: console log in vue 
Javascript :: react router dom install 
Javascript :: ajax failure response 
Javascript :: fs , valid path check 
Javascript :: animate jquery 
Javascript :: how to get href value of anchor tag in jquery in list 
Javascript :: check all values from keys in object js 
Javascript :: ERESOLVE unable to resolve dependency tree Found: react@17.0.2 Could not resolve dependency: react native paper 
Javascript :: send refresh token in axios interceptor 
Javascript :: reload page in react router dom v6 
Javascript :: width and height in js 
Javascript :: vue watch child property 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =