javascript - Using "alert" and "confirm" as variable names -
according this mdn article , other source can find, "alert" , "confirm" not reserved words in javascript. why not listed here, , safe use variable names inside of function bodies?
they safe use inside function bodies long declare them var. if don't declare them var, overwrite them in global (window) scope, cause lot of issues.
Comments
Post a Comment