Write a function that takes a string as input and checks if all characters in the string have sequential Unicode values (in decimals). The function should return true if all characters have sequential values and false otherwise. Use the codePointAt() method.
Unicode functions
Are they close neighbors?
Report a typo
Sample Input 1:
abcdSample Output 1:
trueWrite a program in JavaScript
const readline = require('readline');
/* Do not change code above */
function sequentialCharTest(str) {
//Write your code here
}
/* Do not change code below */
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.on('line', (input) => {
const result = sequentialCharTest(input);
console.log(result);
});
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.