GeezerVison is showing github.com — Merge pull request #12 from Exarchiasghost/master · TomaszMoroz/JavaScript-Lessons@0edb37e
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: Basic_Concepts/Callback/README.md +44Lines changed: 44 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -36,4 +36,48 @@ The *.hide* action hides the area that is defined by the selector. | 36 | 36 |
| 37 | 37 | For more information check the [W2schools' documentation on jQuery](http://www.w3schools.com/jquery/jquery_syntax.asp) | 38 | 38 |
| | 39 | +##Javascript functions | | 40 | + | | 41 | +According to W3schools: | | 42 | + | | 43 | +A JavaScript function is a block of code designed to perform a particular task. | | 44 | + | | 45 | +A JavaScript function is executed when "something" invokes it (calls it). | | 46 | + | | 47 | + function myFunction(p1, p2) { | | 48 | + return p1 * p2; // The function returns the product of p1 and p2 | | 49 | + } | | 50 | + | | 51 | +###**JavaScript Function Syntax** | | 52 | + | | 53 | +A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses (). | | 54 | + | | 55 | +Function names can contain letters, digits, underscores, and dollar signs (same rules as variables). | | 56 | + | | 57 | +The parentheses may include parameter names separated by commas: | | 58 | +(parameter1, parameter2, ...) | | 59 | + | | 60 | +The code to be executed, by the function, is placed inside curly brackets: {} | | 61 | + | | 62 | + | | 63 | + function name(parameter1, parameter2, parameter3) { | | 64 | + code to be executed | | 65 | + } | | 66 | + | | 67 | + | | 68 | +Function **parameters** are the **names** listed in the function definition. | | 69 | + | | 70 | +Function **arguments** are the real **values** received by the function when it is invoked. | | 71 | + | | 72 | +Inside the function, the arguments behave as local variables. | | 73 | + | | 74 | +#The New Boston | | 75 | +## Links | | 76 | + | | 77 | +- [Support](https://www.patreon.com/thenewboston) | | 78 | +- [thenewboston.com](https://thenewboston.com/) | | 79 | +- [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/) | | 80 | +- [Twitter](https://twitter.com/bucky_roberts) | | 81 | +- [Google+](https://plus.google.com/+BuckyRoberts) | | 82 | +- [reddit](https://www.reddit.com/r/thenewboston/) | 39 | 83 | > Written with [StackEdit](https://stackedit.io/). |
Collapse file Copy file name to clipboardExpand all lines: Basic_Concepts/Closures/README.md +44Lines changed: 44 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -35,4 +35,48 @@ In our example we used things like this. to manipulate our variables in a specia | 35 | 35 |
| 36 | 36 | For more information please check the [W3schools Javascript closures' documentation page](http://www.w3schools.com/js/js_function_closures.asp). | 37 | 37 |
| | 38 | +##Javascript functions | | 39 | + | | 40 | +According to W3schools: | | 41 | + | | 42 | +A JavaScript function is a block of code designed to perform a particular task. | | 43 | + | | 44 | +A JavaScript function is executed when "something" invokes it (calls it). | | 45 | + | | 46 | + function myFunction(p1, p2) { | | 47 | + return p1 * p2; // The function returns the product of p1 and p2 | | 48 | + } | | 49 | + | | 50 | +###**JavaScript Function Syntax** | | 51 | + | | 52 | +A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses (). | | 53 | + | | 54 | +Function names can contain letters, digits, underscores, and dollar signs (same rules as variables). | | 55 | + | | 56 | +The parentheses may include parameter names separated by commas: | | 57 | +(parameter1, parameter2, ...) | | 58 | + | | 59 | +The code to be executed, by the function, is placed inside curly brackets: {} | | 60 | + | | 61 | + | | 62 | + function name(parameter1, parameter2, parameter3) { | | 63 | + code to be executed | | 64 | + } | | 65 | + | | 66 | + | | 67 | +Function **parameters** are the **names** listed in the function definition. | | 68 | + | | 69 | +Function **arguments** are the real **values** received by the function when it is invoked. | | 70 | + | | 71 | +Inside the function, the arguments behave as local variables. | | 72 | + | | 73 | +#The New Boston | | 74 | +## Links | | 75 | + | | 76 | +- [Support](https://www.patreon.com/thenewboston) | | 77 | +- [thenewboston.com](https://thenewboston.com/) | | 78 | +- [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/) | | 79 | +- [Twitter](https://twitter.com/bucky_roberts) | | 80 | +- [Google+](https://plus.google.com/+BuckyRoberts) | | 81 | +- [reddit](https://www.reddit.com/r/thenewboston/) | 38 | 82 | > Written with [StackEdit](https://stackedit.io/). |
Collapse file Copy file name to clipboardExpand all lines: Basic_Concepts/Equality/README.md +44Lines changed: 44 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -39,4 +39,48 @@ In order to have a better understanding of logical operators here are few more e | 39 | 39 | For more informations please visit the documentation page of w3schools [about comparison and logical operators](http://www.w3schools.com/js/js_comparisons.asp). | 40 | 40 |
| 41 | 41 |
| | 42 | +##Javascript functions | | 43 | + | | 44 | +According to W3schools: | | 45 | + | | 46 | +A JavaScript function is a block of code designed to perform a particular task. | | 47 | + | | 48 | +A JavaScript function is executed when "something" invokes it (calls it). | | 49 | + | | 50 | + function myFunction(p1, p2) { | | 51 | + return p1 * p2; // The function returns the product of p1 and p2 | | 52 | + } | | 53 | + | | 54 | +###**JavaScript Function Syntax** | | 55 | + | | 56 | +A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses (). | | 57 | + | | 58 | +Function names can contain letters, digits, underscores, and dollar signs (same rules as variables). | | 59 | + | | 60 | +The parentheses may include parameter names separated by commas: | | 61 | +(parameter1, parameter2, ...) | | 62 | + | | 63 | +The code to be executed, by the function, is placed inside curly brackets: {} | | 64 | + | | 65 | + | | 66 | + function name(parameter1, parameter2, parameter3) { | | 67 | + code to be executed | | 68 | + } | | 69 | + | | 70 | + | | 71 | +Function **parameters** are the **names** listed in the function definition. | | 72 | + | | 73 | +Function **arguments** are the real **values** received by the function when it is invoked. | | 74 | + | | 75 | +Inside the function, the arguments behave as local variables. | | 76 | + | | 77 | +#The New Boston | | 78 | +## Links | | 79 | + | | 80 | +- [Support](https://www.patreon.com/thenewboston) | | 81 | +- [thenewboston.com](https://thenewboston.com/) | | 82 | +- [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/) | | 83 | +- [Twitter](https://twitter.com/bucky_roberts) | | 84 | +- [Google+](https://plus.google.com/+BuckyRoberts) | | 85 | +- [reddit](https://www.reddit.com/r/thenewboston/) | 42 | 86 | > Written with [StackEdit](https://stackedit.io/). |
Collapse file Copy file name to clipboardExpand all lines: Basic_Concepts/Objects/README.md +44Lines changed: 44 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -38,4 +38,48 @@ We achieve to insert more values in one variable by turning it to an object and | 38 | 38 | - in Wikipedia Read more about [Javascript | 39 | 39 | Objects](http://www.w3schools.com/js/js_objects.asp) in W3schools | 40 | 40 |
| | 41 | +##Javascript functions | | 42 | + | | 43 | +According to W3schools: | | 44 | + | | 45 | +A JavaScript function is a block of code designed to perform a particular task. | | 46 | + | | 47 | +A JavaScript function is executed when "something" invokes it (calls it). | | 48 | + | | 49 | + function myFunction(p1, p2) { | | 50 | + return p1 * p2; // The function returns the product of p1 and p2 | | 51 | + } | | 52 | + | | 53 | +###**JavaScript Function Syntax** | | 54 | + | | 55 | +A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses (). | | 56 | + | | 57 | +Function names can contain letters, digits, underscores, and dollar signs (same rules as variables). | | 58 | + | | 59 | +The parentheses may include parameter names separated by commas: | | 60 | +(parameter1, parameter2, ...) | | 61 | + | | 62 | +The code to be executed, by the function, is placed inside curly brackets: {} | | 63 | + | | 64 | + | | 65 | + function name(parameter1, parameter2, parameter3) { | | 66 | + code to be executed | | 67 | + } | | 68 | + | | 69 | + | | 70 | +Function **parameters** are the **names** listed in the function definition. | | 71 | + | | 72 | +Function **arguments** are the real **values** received by the function when it is invoked. | | 73 | + | | 74 | +Inside the function, the arguments behave as local variables. | | 75 | + | | 76 | +#The New Boston | | 77 | +## Links | | 78 | + | | 79 | +- [Support](https://www.patreon.com/thenewboston) | | 80 | +- [thenewboston.com](https://thenewboston.com/) | | 81 | +- [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/) | | 82 | +- [Twitter](https://twitter.com/bucky_roberts) | | 83 | +- [Google+](https://plus.google.com/+BuckyRoberts) | | 84 | +- [reddit](https://www.reddit.com/r/thenewboston/) | 41 | 85 | > Written with [StackEdit](https://stackedit.io/). |
Collapse file Copy file name to clipboardExpand all lines: Basic_Concepts/Promise/README.md +44Lines changed: 44 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -56,4 +56,48 @@ The *.append* action appends, with other words prints something to the selected | 56 | 56 | For more information check the [W2schools' documentation on jQuery](http://www.w3schools.com/jquery/jquery_syntax.asp) | 57 | 57 |
| 58 | 58 |
| | 59 | +##Javascript functions | | 60 | + | | 61 | +According to W3schools: | | 62 | + | | 63 | +A JavaScript function is a block of code designed to perform a particular task. | | 64 | + | | 65 | +A JavaScript function is executed when "something" invokes it (calls it). | | 66 | + | | 67 | + function myFunction(p1, p2) { | | 68 | + return p1 * p2; // The function returns the product of p1 and p2 | | 69 | + } | | 70 | + | | 71 | +###**JavaScript Function Syntax** | | 72 | + | | 73 | +A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses (). | | 74 | + | | 75 | +Function names can contain letters, digits, underscores, and dollar signs (same rules as variables). | | 76 | + | | 77 | +The parentheses may include parameter names separated by commas: | | 78 | +(parameter1, parameter2, ...) | | 79 | + | | 80 | +The code to be executed, by the function, is placed inside curly brackets: {} | | 81 | + | | 82 | + | | 83 | + function name(parameter1, parameter2, parameter3) { | | 84 | + code to be executed | | 85 | + } | | 86 | + | | 87 | + | | 88 | +Function **parameters** are the **names** listed in the function definition. | | 89 | + | | 90 | +Function **arguments** are the real **values** received by the function when it is invoked. | | 91 | + | | 92 | +Inside the function, the arguments behave as local variables. | | 93 | + | | 94 | +#The New Boston | | 95 | +## Links | | 96 | + | | 97 | +- [Support](https://www.patreon.com/thenewboston) | | 98 | +- [thenewboston.com](https://thenewboston.com/) | | 99 | +- [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/) | | 100 | +- [Twitter](https://twitter.com/bucky_roberts) | | 101 | +- [Google+](https://plus.google.com/+BuckyRoberts) | | 102 | +- [reddit](https://www.reddit.com/r/thenewboston/) | 59 | 103 | > Written with [StackEdit](https://stackedit.io/). |
Collapse file Copy file name to clipboardExpand all lines: Basic_Concepts/Prototype/README.md +45-1Lines changed: 45 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -70,4 +70,48 @@ We achieve to insert more values in one variable by turning it to an object and | 70 | 70 |
| 71 | 71 |
| 72 | 72 |
| 73 | | -> Written with [StackEdit](https://stackedit.io/). | | 73 | +##Javascript functions | | 74 | + | | 75 | +According to W3schools: | | 76 | + | | 77 | +A JavaScript function is a block of code designed to perform a particular task. | | 78 | + | | 79 | +A JavaScript function is executed when "something" invokes it (calls it). | | 80 | + | | 81 | + function myFunction(p1, p2) { | | 82 | + return p1 * p2; // The function returns the product of p1 and p2 | | 83 | + } | | 84 | + | | 85 | +###**JavaScript Function Syntax** | | 86 | + | | 87 | +A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses (). | | 88 | + | | 89 | +Function names can contain letters, digits, underscores, and dollar signs (same rules as variables). | | 90 | + | | 91 | +The parentheses may include parameter names separated by commas: | | 92 | +(parameter1, parameter2, ...) | | 93 | + | | 94 | +The code to be executed, by the function, is placed inside curly brackets: {} | | 95 | + | | 96 | + | | 97 | + function name(parameter1, parameter2, parameter3) { | | 98 | + code to be executed | | 99 | + } | | 100 | + | | 101 | + | | 102 | +Function **parameters** are the **names** listed in the function definition. | | 103 | + | | 104 | +Function **arguments** are the real **values** received by the function when it is invoked. | | 105 | + | | 106 | +Inside the function, the arguments behave as local variables. | | 107 | + | | 108 | +#The New Boston | | 109 | +## Links | | 110 | + | | 111 | +- [Support](https://www.patreon.com/thenewboston) | | 112 | +- [thenewboston.com](https://thenewboston.com/) | | 113 | +- [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/) | | 114 | +- [Twitter](https://twitter.com/bucky_roberts) | | 115 | +- [Google+](https://plus.google.com/+BuckyRoberts) | | 116 | +- [reddit](https://www.reddit.com/r/thenewboston/) | | 117 | +> Written with [StackEdit](https://stackedit.io/). |
Collapse file Copy file name to clipboardExpand all lines: Basic_Concepts/Scope/README.md +44Lines changed: 44 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -37,4 +37,48 @@ In our example we used things like this. to manipulate our variables in a specia | 37 | 37 | For more information please check the [W3schools Javascript closures' documentation page](http://www.w3schools.com/js/js_function_closures.asp). | 38 | 38 |
| 39 | 39 |
| | 40 | +##Javascript functions | | 41 | + | | 42 | +According to W3schools: | | 43 | + | | 44 | +A JavaScript function is a block of code designed to perform a particular task. | | 45 | + | | 46 | +A JavaScript function is executed when "something" invokes it (calls it). | | 47 | + | | 48 | + function myFunction(p1, p2) { | | 49 | + return p1 * p2; // The function returns the product of p1 and p2 | | 50 | + } | | 51 | + | | 52 | +###**JavaScript Function Syntax** | | 53 | + | | 54 | +A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses (). | | 55 | + | | 56 | +Function names can contain letters, digits, underscores, and dollar signs (same rules as variables). | | 57 | + | | 58 | +The parentheses may include parameter names separated by commas: | | 59 | +(parameter1, parameter2, ...) | | 60 | + | | 61 | +The code to be executed, by the function, is placed inside curly brackets: {} | | 62 | + | | 63 | + | | 64 | + function name(parameter1, parameter2, parameter3) { | | 65 | + code to be executed | | 66 | + } | | 67 | + | | 68 | + | | 69 | +Function **parameters** are the **names** listed in the function definition. | | 70 | + | | 71 | +Function **arguments** are the real **values** received by the function when it is invoked. | | 72 | + | | 73 | +Inside the function, the arguments behave as local variables. | | 74 | + | | 75 | +#The New Boston | | 76 | +## Links | | 77 | + | | 78 | +- [Support](https://www.patreon.com/thenewboston) | | 79 | +- [thenewboston.com](https://thenewboston.com/) | | 80 | +- [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/) | | 81 | +- [Twitter](https://twitter.com/bucky_roberts) | | 82 | +- [Google+](https://plus.google.com/+BuckyRoberts) | | 83 | +- [reddit](https://www.reddit.com/r/thenewboston/) | 40 | 84 | > Written with [StackEdit](https://stackedit.io/). |
|