开发者

How do you use a key to generate new code when using charCodeAt()?

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 );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜