I have been working on my science fair project that is due in 3 days and I need help. I using charCodeAt(), however I don't know how to write the code that will use the key and charCodeAt() to create a new code. Ple开发者_JAVA技巧ase help.
var plainText = "watergate";
var cipherText = "";
for ( var i = 0; i < plainText.length; i++ )
cipherText += String.fromCharCode( plainText.charCodeAt(i) + 42 );
精彩评论