Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function charsInRange(char1, char2) {
- let result = '';
- let start = Math.min(char1.charCodeAt(0), char2.charCodeAt(0));
- let end = Math.max(char1.charCodeAt(0), char2.charCodeAt(0));
- for (let i = start + 1; i < end; i++) {
- result += String.fromCharCode(i);
- }
- console.log(result.split('').join(" "));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement