资讯
Scope in JavaScript refers to context (or portion) of the code which determines the accessibility (visibility) of variables. In JavaScript, we have two types of scope, local , and global.
Tips for naming JavaScript variables Dynamic typing and JavaScript variables How to work with string variables What you need to know about variable scope What is a user-defined variable in JavaScript?
i.e. intuitively it looks like the variable will only be available within the block but it is accessible outside the block .. in javascript's case, because var doesn't make a block level declaration.
一些您可能无法访问的结果已被隐去。
显示无法访问的结果