📜  eval( - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:44.912000             🧑  作者: Mango

代码示例2
console.log(eval('2 + 2'));
// expected output: 4

console.log(eval(new String('2 + 2')));
// expected output: 2 + 2

console.log(eval('2 + 2') === eval('4'));
// expected output: true

console.log(eval('2 + 2') === eval(new String('2 + 2')));
// expected output: false