What's the secret message?

Report a typo

Create a function called decodeSecretMessage() that decodes a secret message represented by a series of Unicode code points. The function should take an array of Unicode code point values, called codePoints, as input and return the decoded secret word as a string.

To decode each character in the message, you can use a loop to iterate over the codePoints array inside the function.

Sample Input 1:

161, 72, 111, 108, 97, 33, 32, 128075

Sample Output 1:

¡Hola! 👋
Write a program in JavaScript
function decodeSecretMessage(codePoints) {
/* Do not change code above */

//Write your code here

/* Do not change code below */
}
process.stdin.setEncoding('utf8');

let input = '';

process.stdin.on('data', (data) => {
input += data;
});

process.stdin.on('end', () => {
const codePoints = input.trim().split(/,\s*/).map(Number);
const decodedMessage = decodeSecretMessage(codePoints);
process.stdout.write(decodedMessage);
});
___

Create a free account to access the full topic