qrbadw
Last Updated: February 25, 2016
·
187
· alexindigo

Generate 1099 random english letters without custom functions in Javascript

Works only in Chrome/Nodejs. Safari and Firefox will give you only 17 characters. :)

Math.random()
  .toString(9)
  .slice(2)
  .split('')
  .map(Number)
  .map(Math.atan2.bind(Math, 90))
  .map(Math.pow.bind(Math, 17))
  .map(Math.ceil.bind(Math))
  .map(Array.prototype.reduce.bind([0], String.fromCharCode.bind(String)))
  .join(' ')
  ;