Ciprian Țepeș - Creștin Ortodox, Web Designer & Web Developer

Un site personal cu subiecte legate de programare, design, creștinism și chestiuni morale

  • Prima pagină
  • Cine sunt
  • Contact

Categorii

  • Cugetări
  • Generalități
  • Jurnal Programare
  • Muncă

Articole recente

  • M-am apucat (din nou) de programare
  • Am avut Covid
  • Sindromul impostorului în diferite domenii de activitate
  • Ceea ce ne desfată, ne dăunează
  • Despre malahie / onanie / masturbare

Powered by Genesis

  • Prima pagină
  • Cine sunt
  • Contact

Bonfire: Binary Agents

24 octombrie 2015 by Ciprian Țepeș

Mi-a mai revenit puțin moralul. Mai jos este soluția pe care am găsit-o eu la acest bonfire:

function binaryAgent(str) {
str = str.replace(/([0-9]+)(\s)?/g, function(match, p1, p2){ p1 = String.fromCharCode(parseInt(p1, 2)); p2 = ''; return p1+p2; });
return str;
}

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

Spor 🙂

Din categoria: Jurnal Programare Etichete: FreeCodeCamp, Javascript, Regular Expressions, web development

Acest site folosește cookie-uri. Accept Info
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Întotdeauna activate
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SALVEAZĂ ȘI ACCEPTĂ