We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link: https://www.codewars.com/kata/encrypt-this/javascript
Encrypt this!
You want to create secret messages which can be deciphered by the Decipher this! kata. Here are the conditions:
Examples:
encryptThis("Hello") === "72olle" encryptThis("good") === "103doo" encryptThis("hello world") === "104olle 119drlo"
The text was updated successfully, but these errors were encountered:
function encryptThis(string) { if (string.length === 0) { return false } const encryptedString = [] const words = string.split(' ') for (i = 0; i < words.length; i++) { const word = words[i].split('') word.splice(0, 1, word[0].charCodeAt()) word.splice(1, 1, words[i][word.length-1]) word.splice(word.length-1, 1, words[i][1]) encryptedString.push(word.join('')) } return encryptedString.join(' ') } encryptThis("Hello World") encryptThis("Radhika Morabia")
Link: https://repl.it/@rmorabia/ScrawnyOffshoreDegree
Sorry, something went wrong.
No branches or pull requests
Link: https://www.codewars.com/kata/encrypt-this/javascript
Encrypt this!
You want to create secret messages which can be deciphered by the Decipher this! kata. Here are the conditions:
Examples:
The text was updated successfully, but these errors were encountered: