Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function decrypter(input) {
- let wordsArray = input;
- for (let word of wordsArray) {
- let newWord = '';
- for (let i = 0; i < word.length; i++) {
- let code = word.charCodeAt(i);
- code += 1;
- newWord += String.fromCharCode(code);
- }
- console.log(newWord);
- }
- }
- decrypter(['University', 'Potato', 'Putin', 'ABC']);
Advertisement
Add Comment
Please, Sign In to add comment