Skip to content

Basics Scope README.md and Tuna. #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 26 additions & 12 deletions Basic_Concepts/Scope/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,39 @@

# Scope

This MD file serves as example/template.
According [Wikipedia](https://en.wikipedia.org/wiki/Variable_%28computer_science%29#Scope_and_extent):
*"Scope is an important part of the name resolution of a variable. Most languages define a specific scope for each variable (as well as any other named entity), which may differ within a given program. The scope of a variable is the portion of the program code for which the variable's name has meaning and for which the variable is said to be "visible"."*

It will be filled up soon.

(for Bucky to fill up)
# Course Documentation


# Course Documentation
## Scope and Variables

Variables are the names of the places that some value is stored and the most typical syntax to create them is:

var variablesname = valueofvariable;


and after the creation we are typically changing the value with this syntax:

(this for me to fill up with every element
variablesname = newvalueforthevariable;

that you use in lessons. syntax

And if it is not clear the easiest thing in the world is to access the variable just by writing the variable there where we will use its value:

console.log(variablesname)

explaination and links for more)

Scope on the other hand is about variable's inheritance, (with other words how accessible can a variable be). Typically it has two levels:

## Element to explain
- **Global** External variable when every function can access it.
- **Local** Internal variable when only the function that

(for example console.log)

In our example we used things like this. to manipulate our variables in a special way. This is called a JavaScript closure. It makes it possible for a function to have "private" variables or use private variables in a special way. (see Objected Oriented Programming or Classes.)

For more information please check the [W3schools Javascript closures' documentation page](http://www.w3schools.com/js/js_function_closures.asp).


***Links***
- Wikipedia
- Anotherlink,com
> Written with [StackEdit](https://stackedit.io/).