📅  最后修改于: 2022-03-11 15:03:49.898000             🧑  作者: Mango
// Code you want to evaluate
var code = 'return this.whatever'
// What you want "this" bound to:
var that = { whatever: 69 }
// Now do this:
var result = new Function(code).call(that)