Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve (firstChar, secondChar) {
- let charSort = [firstChar, secondChar].sort();
- function charArray() {
- let result = '';
- for (let i = charSort[0].charCodeAt(0) + 1; i < charSort[1].charCodeAt(0); i++) {
- result += String.fromCharCode(i) + ' ';
- }
- return result.trimEnd();
- }
- console.log(charArray());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement