44

你不知道的 eval

 5 years ago
source link: https://juejin.im/post/5bead276e51d452ceb51e027
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
前言 eval() 是 JavaScript 中一个非常有用的函数,它可以一段代码字符串动态执行。然而各种编码规范和最佳实践都强烈抵制 eval,几乎将 eval 打入了死牢,大牛 Douglas Crockford 也在《JavaScript 语言精粹》一书

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK