标签: javascript closures lexical-scope lexical-closures
为什么关闭不起作用?
var derivedKey; lightwallet.keystore.deriveKeyFromPassword(password, function (err, pwDerivedKey) { derivedKey = pwDerivedKey; }); if (!derivedKey){ console.error ("ERROR no derivedKey"); }
错误。有什么可能的解释?