Fake Binary

JavaScript

const fakeBin = (x) => [...x].map((val) => val < 5 ? 0 : 1).join('');

Tags

  1. javascript (Private)
  2. 8-kyu (Private)
  3. codewars (Private)
  4. answer (Private)