![]() ![]() It relies on taking the alphabet and "shifting" letters to the right or left, based on the typical alphabetic order.įor example, if you were to "shift" the alphabet to the right by 3, the letter "A" would become "D".Ĭaesar ( "thinkful", 3 ) //> 'wklqnixo' caesar ( "thinkful", - 3 ) //> 'qefkhcri' caesar ( "wklqnixo", 3, false ) //> 'thinkful' caesar ( "This is a secret message!", 8 ) //> 'bpqa qa i amkzmb umaaiom!' caesar ( "BPQA qa I amkzmb umaaiom!", 8, false ) //> 'this is a secret message!' caesar ( "thinkful" ) //> false caesar ( "thinkful", 99 ) //> false caesar ( "thinkful", - 26 ) //> false The Caesar Shift is a type of substitution cipher originally used by Julius Caesar to protect messages of military significance. Note: Your submission will be tested on a total of 29 tests. Write tests for the substitution() function.Write tests for the polybius() function.Each function and cipher is described below.īelow is a checklist of what you need to accomplish. For each cipher, you should make a series of tests using Mocha & Chai to confirm that your cipher works.Īll of the functions can be found inside of the src/ directory. You are tasked with building functions for an application that will either encode or decode a string using a variety of ciphers. ![]() Debugging through reading errors and using the VSCode debugger.Iterating through strings, objects, and arrays.Modifying the package.json file with new scripts.HTML and CSS was supplied with starter code. This project was designed to test the ability to build tricky algorithms in JavaScript as well as write unit tests with Mocha & Chai. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |