开发者

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

开发者 https://www.devze.com 2023-01-27 21:22 出处:网络
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

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

精彩评论

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