Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Working with text
Learn more about the String Data Type here
Strings are declared using the " ' or `respectively.
For example, to create a String variable called name, we use the following code:
let name = "John";
or to declare a String constant called country, we use the following code:
const country = "Germany";
Now, for our caesar cipher decryption program, we will need to store our message and all the letters in our alphabet as Strings. In the code below, create a variable called
message and set it to hello and a constant called
ALPHABET (note the capitals!) set it to abcdefghijklmnopqrstuvwxyz
// Enter your code here
Enter to Rename, Shift+Enter to Preview
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content