From anonymous, 1 Year ago, written in Plain Text.
Embed
  1. > "haus".split('').map(function(e) { return "abcdefghijklmnopqrstuvwxyz".indexOf(e); }).join(' ');
  2. '7 0 20 18'
  3. > "Hallo Welt".toLowerCase().split('').map(function(a, i, w) { return w.indexOf(a) == w.lastIndexOf(a) ? '(' : ')'; }).join('');
  4. '(())(((()('
  5. > "foobar".indexOf("z")
  6. -1
  7.