Global vs. Local Scope in Functions
remove redundant "a" fix FreeCodeCamp/FreeCodeCamp#5494
This commit is contained in:
parent
b993e0db4e
commit
8a487a91c3
@ -2044,7 +2044,7 @@
|
||||
"id": "56533eb9ac21ba0edf2244c0",
|
||||
"title": "Global vs. Local Scope in Functions",
|
||||
"description": [
|
||||
"It is possible to have both a <dfn>local</dfn> and <dfn>global</dfn> variables with the same name. When you do this, the <code>local</code> variable takes precedence over the <code>global</code> variable.",
|
||||
"It is possible to have both <dfn>local</dfn> and <dfn>global</dfn> variables with the same name. When you do this, the <code>local</code> variable takes precedence over the <code>global</code> variable.",
|
||||
"In this example:",
|
||||
"<blockquote>var someVar = \"Hat\";<br>function myFun() {<br> var someVar = \"Head\";<br> return someVar;<br>}</blockquote>",
|
||||
"The function <code>myFun</code> will return <code>\"Head\"</code> because the <code>local</code> version of the variable is present.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user