JS 利用eval构建replace函数无效

代码含义:构建一个简单的GADERYPOLUKI解码器

The GADERYPOLUKI is a simple substitution cypher used in scouting to encrypt messages. The encryption is based on short, easy to remember key. The key is written as paired letters, which are in the cipher simple replacement.

example:

encode("ABCD", "agedyropulik");             // => GBCE

代码如下,我想用eval函数构建出可以替换字符的函数,但是貌似没有用。

https://img1.mukewang.com/5c1882270001ac3606910570.jpg

有只小跳蛙
浏览 482回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript