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(' ')
;Written by Alex Indigo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Chrome
Authors
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#