评估范围不正确

Incorrect scope for eval

我有this code

eval(script);

其中脚本是:

var script = console.log('xwin:', xwin);

但是它一直告诉我 xwin 未定义,有人知道为什么 eval 没有采用函数作用域吗?有人知道怎么做吗?

问题不在于作用域或 eval,而是在代码的其他地方调用 "blah" 函数时没有为 xwin 传递值。

见行:109