|
+7(3812)790055
|
Are you having trouble with a in the CodeHS console, or does the logic make sense now?
: You start with an empty string ( let encoded = ""; ). Every time your loop finds a new encoded letter, you add it to that string. A Common Example Structure
Cracking the code for is a milestone for many intro programming students. It’s the moment where you move beyond just following instructions and start thinking like a cryptographer. 83 8 create your own encoding codehs answers exclusive
: You need a way to tell the computer that 'A' becomes '!', 'B' becomes '@', and so on. In JavaScript (the language typically used in CodeHS), you’ll use a series of if/else statements or a single function that handles the conversion.
: Use .toLowerCase() on the input character before checking it in your if statements to save time. Are you having trouble with a in the
By following this structure, you aren't just copy-pasting an answer; you're building a functional piece of software that demonstrates a core concept of data security and string manipulation.
While you should customize your symbols to make it "your own," here is the structural logic that passes the CodeHS autograder: javascript A Common Example Structure Cracking the code for
Create Your Own Encoding: A Step-by-Step Guide for CodeHS 8.3.8
: Double-check your for loop syntax: (let i = 0; i < str.length; i++) .