getTopScopeValue

fun getTopScopeValue(scope: Scriptable, key: Any): Any?

The value parked under key on the nearest scope in the chain that has one.