Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function charactersInRange0(ch1, ch2) {
- 'use strict'
- let n1 = ch1.charCodeAt(0)
- let n2 = ch2.charCodeAt(0)
- //min и max
- const swap = (a, b) => {
- if (a > b) {
- let c = b
- b = a
- a = c
- }
- return [a, b]
- }
- [n1, n2] = swap(n1, n2)
- let output = ''
- for (let i = n1 + 1; i < n2; i++)
- output += String.fromCharCode(i) + ' '
- console.log(output)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement