私は知っeval
てwith
いて、通常は落胆していますが、それはさておき、このコードを機能させるのに問題があります:
with({ a: 'hello world' }){
var output = eval('{ text: a }')
}
私はオブジェクトoutput
になることを期待していました:
{ text: "hello world" }
代わりoutput
に文字列 'hello world' です
誰かが私が欠けているものを見るのを手伝ってくれますか?