javascript - Generating a Range of Ascii Values -
is there more effective way of generating ascii values? i'm trying emulate same pattern in javascript i've written in bash.
bash
read -ra chars <<< $(echo -e "$(printf '\\x%x ' {33..126})")
js
var chars = []; for(var chr = 33; chr < 126; chr++) { chars.push(string.fromcharcode(chr)); }
since want generate password them, might put characters in string, this: generate random string/characters in javascript
Comments
Post a Comment