If the js closure feature suddenly fails

var a = "global";
function b(){
    var a = "local";
    return function c() {
        console.log(a);
    }
}
b()()// "local"

the above is an example of closures. If js loses the closure features
, how can the function be modified to simulate the closure characteristics of js, so that the output results are consistent with those before the loss of features?

Mar.09,2021

closure function is to save the current scope
make use of the object
you can create an object inside the function and then return the current object to simulate the closure characteristics
it feels too tedious to know any other good suggestions

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e49644-43808.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e49644-43808.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?