var alpha = ["a","b", "c", "d", "e", "f", "g", "h", "i","j", "k", "l","m","n","o","p","q", "r","s","t","u","v","w","x", "y", "z"];
var alphaMatch = "";
var alphaMatch2 = "";
var output = "";
var decodeOutput = "";
var input =readLine();
var function1 = encode(input);
function2 = decode(function1);
//The name of this function should not be changed
function main() {
/* var inputReturn = print(encode(input)) */
/* var input = readLine();
if(input.startsWith("a") == true || input.startsWith("e") == true || input.startsWith("i") == true || input.startsWith("o") == true || input.startsWith("u") == true){
print(input + "yay");
} else {
var cons = input.slice(0,1);
print(input.substring(1) + cons + "ay");
}
*/
/* var num = readNumber();
if(num > 5) {
print(num);
} else {
print("I don't know man, I don't know.")
} */
/* var input = readLine();
if(input.length > 5) {
if(input.length % 2) {
print(input.substring(0, input.length /2));
} else {
print(input.substring(input.length/2));
}
} else {
print("your input was less than or equal to 5, and I can't do anything with that man.");
} */
/* var input1 = readNumber();
var input2 = readNumber();
var output = 0;
while(input1 < input2) {
output += input1;
input1++;
}
print(output); */
}
function encode(input) {
for(var i = 0; i < input.length; i++){
//we want the value of i to become two plus the value of j
alphaMatch = alpha.indexOf(input[i]);
alphaMatch += 2;
output += alpha[alphaMatch];
return output;
} print(output);
}
function decode(output) {
for(var i = 0; i < input.length; i++){
//we want the value of i to become two plus the value of j
alphaMatch2 = alpha.indexOf(input[i]);
alphaMatch2 -= 2;
decodeOutput += alpha[alphaMatch2];
return decodeOutput;
} print(decodeOutput);
}
function practice31() {
var input = readLine();
if (input.startsWith("a") || input.startsWith("e") ||...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.