Skip to content

Instantly share code, notes, and snippets.

@psenger
Last active February 1, 2020 00:00
Show Gist options
  • Save psenger/c32ef7e6ff7c1027266d3e83bde352fc to your computer and use it in GitHub Desktop.
Save psenger/c32ef7e6ff7c1027266d3e83bde352fc to your computer and use it in GitHub Desktop.
[Generate Full Range of Chars in Javascript] #JavaScript #TestHelper
// I needed something to create a string of characters for testing, Im lazy.
// Generate Full Range of Chars
// I needed something to create a string of characters for testing, Im lazy.
var res = '';
for ( var i = 33; i<=126; i++ ) {
res = res + String.fromCharCode(i);
console.log('i=',i,String.fromCharCode(i));
}
console.log( 'res=', res );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment