Skip to content
Open
Show file tree
Hide file tree
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
30 changes: 14 additions & 16 deletions Basic_Concepts/Callback/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
![JavaScript Lessons](http://i.imgur.com/BgUMUGU.png)

![](http://i.imgur.com/BgUMUGU.png)

# Callback

A callback is a function that is called after another function is done executing.
Good for when you are making API calls, and want function to run only after data is retrieved from server.
Good for when you are making API calls, and want function to run only after data is retrieved from server.


# Course Documentation
# Course Documentation

## JQuery

Expand All @@ -18,9 +16,9 @@ The basic syntax of Jquery is:

which

- The sign $ defines that we will work will work with jQuery.
- The selector that defines what will activate our action
- And the action of course that we wish to use. the best way to describe an action is to describe it as an special function that comes from jQuery and interacts with an element of our code.
- The sign $ defines that we will work will work with jQuery.
- The selector that defines what will activate our action
- And the action of course that we wish to use. the best way to describe an action is to describe it as an special function that comes from jQuery and interacts with an element of our code.

for this example:

Expand All @@ -30,13 +28,13 @@ for this example:
});
});

We used the *.click* and the *.hide* action.
We used the *.click* and the *.hide* action.
The *.click* activates a function or another action when we click the selector.
The *.hide* action hides the area that is defined by the selector.

For more information check the [W2schools' documentation on jQuery](http://www.w3schools.com/jquery/jquery_syntax.asp)

##Javascript functions
## Javascript functions

According to W3schools:

Expand All @@ -48,7 +46,7 @@ A JavaScript function is executed when "something" invokes it (calls it).
return p1 * p2; // The function returns the product of p1 and p2
}

###**JavaScript Function Syntax**
### JavaScript Function Syntax

A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses ().

Expand All @@ -59,25 +57,25 @@ The parentheses may include parameter names separated by commas:

The code to be executed, by the function, is placed inside curly brackets: {}


function name(parameter1, parameter2, parameter3) {
code to be executed
}


Function **parameters** are the **names** listed in the function definition.

Function **arguments** are the real **values** received by the function when it is invoked.

Inside the function, the arguments behave as local variables.

#The New Boston
## Links
# The New Boston

## Links

- [Support](https://www.patreon.com/thenewboston)
- [thenewboston.com](https://thenewboston.com/)
- [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/)
- [Twitter](https://twitter.com/bucky_roberts)
- [Google+](https://plus.google.com/+BuckyRoberts)
- [reddit](https://www.reddit.com/r/thenewboston/)
> Written with [StackEdit](https://stackedit.io/).

> Written with [StackEdit](https://stackedit.io/)
28 changes: 12 additions & 16 deletions Basic_Concepts/Closures/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

![](http://i.imgur.com/BgUMUGU.png)
## Closures
![JavaScript Lessons](http://i.imgur.com/BgUMUGU.png)

# Closures

Closures are functions that refer to independent (free) variables (variables that are used locally, but defined in an
enclosing scope). In other words, these functions 'remember' the environment in which they were created.
Expand All @@ -14,28 +14,24 @@ Variables are the names of the places that some value is stored and the most typ

var variablesname = valueofvariable;


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

variablesname = newvalueforthevariable;


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)


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

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


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).

##Javascript functions
## Javascript functions

According to W3schools:

Expand All @@ -47,7 +43,7 @@ A JavaScript function is executed when "something" invokes it (calls it).
return p1 * p2; // The function returns the product of p1 and p2
}

###**JavaScript Function Syntax**
### JavaScript Function Syntax

A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses ().

Expand All @@ -58,25 +54,25 @@ The parentheses may include parameter names separated by commas:

The code to be executed, by the function, is placed inside curly brackets: {}


function name(parameter1, parameter2, parameter3) {
code to be executed
}


Function **parameters** are the **names** listed in the function definition.

Function **arguments** are the real **values** received by the function when it is invoked.

Inside the function, the arguments behave as local variables.

#The New Boston
## Links
# The New Boston

## Links

- [Support](https://www.patreon.com/thenewboston)
- [thenewboston.com](https://thenewboston.com/)
- [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/)
- [Twitter](https://twitter.com/bucky_roberts)
- [Google+](https://plus.google.com/+BuckyRoberts)
- [reddit](https://www.reddit.com/r/thenewboston/)
> Written with [StackEdit](https://stackedit.io/).

> Written with [StackEdit](https://stackedit.io/)
40 changes: 17 additions & 23 deletions Basic_Concepts/Equality/README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,39 @@
![](http://i.imgur.com/BgUMUGU.png)
![JavaScript Lessons](http://i.imgur.com/BgUMUGU.png)

# Equality

Equality is when we use comparison operators to find out if both left and right compared value are equal, (AKA the same).

Equality is when we use comparison operators to find out if both left and right compared value are equal, (AKA the same).

# Course Documentation


## Comparison, (and logical), Operators

In the code that we used


var a = '26';
var b = 26;

console.log(a==b); // true (only checks value)
console.log(a===b); // false (compares type as well)


Things are straight forward, as we explain the use of equal sign as comparison operator to find out if:

**a==b** the values in both a and b, (variables) are the same
and
**a===b** both the values and the type of a and b variables are the same.

In order to have a better understanding of logical operators here are few more examples of comparison and logical operators.


- **!=** not equal values between a and b (left and right variable/statement).
- **!==** not equal value or not equal type between a and b (left and right variable/statement).
- **>** Left statement greater than right statement.
- **<** Left statement less than right statement.
- **>=** left statement greater than or equal to right statement. and
- **<=** Left statement less than or equal to right statement.
- **!=** not equal values between a and b (left and right variable/statement).
- **!==** not equal value or not equal type between a and b (left and right variable/statement).
- **>** Left statement greater than right statement.
- **<** Left statement less than right statement.
- **>=** left statement greater than or equal to right statement. and
- **<=** Left statement less than or equal to right statement.

For more informations please visit the documentation page of w3schools [about comparison and logical operators](http://www.w3schools.com/js/js_comparisons.asp).


##Javascript functions
## Javascript functions

According to W3schools:

Expand All @@ -51,7 +45,7 @@ A JavaScript function is executed when "something" invokes it (calls it).
return p1 * p2; // The function returns the product of p1 and p2
}

###**JavaScript Function Syntax**
### JavaScript Function Syntax

A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses ().

Expand All @@ -62,25 +56,25 @@ The parentheses may include parameter names separated by commas:

The code to be executed, by the function, is placed inside curly brackets: {}


function name(parameter1, parameter2, parameter3) {
code to be executed
}


Function **parameters** are the **names** listed in the function definition.

Function **arguments** are the real **values** received by the function when it is invoked.

Inside the function, the arguments behave as local variables.

#The New Boston
## Links
# The New Boston

## Links

- [Support](https://www.patreon.com/thenewboston)
- [thenewboston.com](https://thenewboston.com/)
- [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/)
- [Twitter](https://twitter.com/bucky_roberts)
- [Google+](https://plus.google.com/+BuckyRoberts)
- [reddit](https://www.reddit.com/r/thenewboston/)
> Written with [StackEdit](https://stackedit.io/).

> Written with [StackEdit](https://stackedit.io/)
32 changes: 14 additions & 18 deletions Basic_Concepts/Objects/README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
![](http://i.imgur.com/BgUMUGU.png)
![](http://i.imgur.com/BgUMUGU.png)

# Objects

Objects are variables that are storing more values, (properties). Objects are a part of the world of Object Oriented Programming, a way of programming that is highly recommended to learn more about it.


# Course Documentation


## Objects
## How to make Objects

In our example for objects we used the following code:


var person = {
name: "Bucky",
age: 87
};


That is the typical syntax of javascripts object as well:

var objectname = {
property1: "property1valueinstringformat",
property2: property2valueinarithmeticformat
};

We achieve to insert more values in one variable by turning it to an object and by use the "property" format to each of our value


{ property: valueofproperty };

Curley brackets are defining the are of the properties, and also they defining that our variable is an object, and we separate our properties with the comma symbol.

- Read more about [Object Oriented
- Read more about [Object Oriented
Programming](https://en.wikipedia.org/wiki/Object-oriented_programming)
- in Wikipedia Read more about [Javascript

- in Wikipedia Read more about [Javascript
Objects](http://www.w3schools.com/js/js_objects.asp) in W3schools

##Javascript functions
## Javascript functions

According to W3schools:

Expand All @@ -50,7 +46,7 @@ A JavaScript function is executed when "something" invokes it (calls it).
return p1 * p2; // The function returns the product of p1 and p2
}

###**JavaScript Function Syntax**
### JavaScript Function Syntax

A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses ().

Expand All @@ -61,25 +57,25 @@ The parentheses may include parameter names separated by commas:

The code to be executed, by the function, is placed inside curly brackets: {}


function name(parameter1, parameter2, parameter3) {
code to be executed
}


Function **parameters** are the **names** listed in the function definition.

Function **arguments** are the real **values** received by the function when it is invoked.

Inside the function, the arguments behave as local variables.

#The New Boston
## Links
# The New Boston

## Links

- [Support](https://www.patreon.com/thenewboston)
- [thenewboston.com](https://thenewboston.com/)
- [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/)
- [Twitter](https://twitter.com/bucky_roberts)
- [Google+](https://plus.google.com/+BuckyRoberts)
- [reddit](https://www.reddit.com/r/thenewboston/)
> Written with [StackEdit](https://stackedit.io/).

> Written with [StackEdit](https://stackedit.io/)
Loading