JS - local approach to change the values of global variables

A = var ""
function AA () {
  A = "card"
}
AA () // note, AA () must be executed, a local variable assigned only affect global
alert (a)

Guess you like

Origin www.cnblogs.com/500m/p/11247391.html