Build a JavaScript function that takes a string as input and returns an array of all the Unicode code points for each character in the string.
Unicode functions
String to a Unicode code points array
Report a typo
Sample Input 1:
Hello TARDIS!Sample Output 1:
[ 72, 101, 108, 108, 111, 32, 84, 65, 82, 68, 73, 83, 33 ]Write a program in JavaScript
function getCodePoints(str) {
var codePoints = [];
/* Do not change code above */
//Write your code here
/* Do not change code below */
return codePoints;
}
process.stdin.once('data', (input) => {
const inputString = input.toString().trim();
const result = getCodePoints(inputString);
console.log(result);
process.stdin.pause();
});
___
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.