if you have a question, add the code first:
if(1===1) {
let nameSet = new Set();
if (1 === 2) {
// do nothing
}
else {
function getArrayFromOl() {
console.log("nameSet:", nameSet)
}
getArrayFromOl()
}
}
this code reported an error in safari 11.0.3:
ReferenceError: Can"t find variable: nameSet
but the relevant variables can be accessed in Chrome.
I think we should also be able to access relevant variables.
is there a god who can explain why the error was reported under safari?