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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -