GeezerVison is showing github.com — Merge pull request #14 from Exarchiasghost/master · TomaszMoroz/JavaScript-Lessons@1278b01
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: Data_Structures/Arrays/Iterators/README.md +82-8Lines changed: 82 additions & 8 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 |  | 2 | 2 |
| 3 | 3 | # Iterators | 4 | | -This MD file serves as example/template. It will be filled up soon. | | 4 | +**Simple Iteration** | | 5 | +The way to iterate elements in javascript arrays is pretty straight forward: | 5 | 6 |
| 6 | | -(for Bucky to fill up) | | 7 | + console.log(food[2]); | 7 | 8 |
| 8 | | -# Course Documentation | 9 | | - | 10 | | -(this for me to fill up with every element that you use in lessons. syntax explaination and links for more) | | 9 | +Array values are retrieved by index (starting at 0 not 1). | | 10 | + | | 11 | +**Iteration through loop** | | 12 | +The best way to iterate an array is mathematically through a loop, like the example bellow: | 11 | 13 |
| 12 | | -## Element to explain | | 14 | + // you can iterate over an array to access each individual element | | 15 | + for(var i=0; i<food.length; i++){ | | 16 | + console.log(i, food[i]); | | 17 | + } | | 18 | + | | 19 | + | 13 | 20 |
| 14 | | -(for example console.log) | | 21 | +# Course Documentation | 15 | 22 |
| 16 | 23 | ##Javascript functions | 17 | 24 |
| @@ -46,7 +53,74 @@ Function **parameters** are the **names** listed in the function definition. | 46 | 53 |
| 47 | 54 | Function **arguments** are the real **values** received by the function when it is invoked. | 48 | 55 |
| 49 | | -Inside the function, the arguments behave as local variables. | | 56 | +Inside the function, the arguments behave as local variables. | | 57 | + | | 58 | +## Arrays | | 59 | + | | 60 | +Arrays are a special type of objects that are getting accessed through numbers from zero up to N-1. Arrays are easy to be recognized from their typical syntax: | | 61 | + | | 62 | + Array_name[0] = the value of the first place | | 63 | + | | 64 | + According [Wikipedia](https://en.wikipedia.org/wiki/Array_data_structure): | | 65 | + *"In computer science, an array data structure, or simply an array, is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key. An array is stored so that the position of each element can be computed from its index tuple by a mathematical formula."* | | 66 | + | | 67 | +Now in our example: | | 68 | + | | 69 | + var food = ['bacon', 'corn', 'ham', 'sausage']; | | 70 | + | | 71 | +We see the initiation through the typical aray syntax: | | 72 | + | | 73 | + | | 74 | + var arrayname = ['first_Element_of_the_Array', 'second_Element_of_the_Array', 'third_Element_of_the_Array', etc... ] | | 75 | + | | 76 | +The most important thing that we need to know about arrays is that Arrays are start counting from 0 instead of 1, (starting counting from 0 is very typical behavior for computers because of the binary system of counting that computer are based of). | | 77 | +That means that for a N entries in an Array we ae counting the places from zero until the N-1th place. | | 78 | +For example to access the 5th element of an array we are typing: | | 79 | + | | 80 | + arrayname[4] | | 81 | + | | 82 | +In our example we used few statments that we should explain bit further: | | 83 | + | | 84 | +**Push and Pop** | | 85 | +Push adds new item to the end of an array | | 86 | + | | 87 | + food.push('tuna'); | | 88 | + console.log(food); | | 89 | + | | 90 | +while pop removes and item from the end of an array. | | 91 | + | | 92 | + var lastItem = food.pop(); | | 93 | + console.log(lastItem); | | 94 | + console.log(food); | | 95 | +For both Push and Pop please feel free to check bellow about stacks. | | 96 | + | | 97 | +**Simple Iteration** | | 98 | +The way to iterate elements in javascript arrays is pretty straight forward: | | 99 | + | | 100 | + console.log(food[2]); | | 101 | + | | 102 | +Array values are retrieved by index (starting at 0 not 1). | | 103 | + | | 104 | +Iteration through loop | | 105 | +The best way to iterate an array is mathematically through a loop, like the example bellow: | | 106 | + | | 107 | + // you can iterate over an array to access each individual element | | 108 | + for(var i=0; i<food.length; i++){ | | 109 | + console.log(i, food[i]); | | 110 | + } | | 111 | + | | 112 | + The simplest type of data structure is a linear array, also called one-dimensional array. For more informations about Arrays please visit the links below: | | 113 | +[Array data structure (Wikipedia)](https://en.wikipedia.org/wiki/Array_data_structure) | | 114 | +[JavaScript Arrays (w3Schools)](http://www.w3schools.com/js/js_arrays.asp) | | 115 | +## Stacks | | 116 | + | | 117 | +A stack is a data structure that can be logically thought of as a real physical stack or pile, a structure where | | 118 | +insertion and deletion of items takes place at one end only called the "top" of the stack. The basic concept can be | | 119 | +illustrated by thinking of your data set as a stack of plates or books where you can only take the top item off the | | 120 | +stack in order to remove things from it. | | 121 | + | | 122 | + | | 123 | + | 50 | 124 |
| 51 | 125 | #The New Boston | 52 | 126 | ## Links | |
Collapse file Copy file name to clipboardExpand all lines: Data_Structures/Arrays/New_ES6_Features_1/README.md +79-12Lines changed: 79 additions & 12 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 |  | 2 | 2 |
| 3 | | -# New ES6 features part 1 | 4 | | -This MD file serves as example/template. It will be filled up soon. | 5 | | - | 6 | | -(for Bucky to fill up) | | 3 | +# New ES6 features part 1 | | 4 | +According to [Wikipedia](https://en.wikipedia.org/wiki/ECMAScript): | | 5 | +ECMAScript (or ES) is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262. It was based on JavaScript, which now tracks ECMAScript. It is commonly used for client-side scripting on the World Wide Web. | | 6 | + | | 7 | + | | 8 | +##6th Edition - ECMAScript 2015 | | 9 | +According to [Wikipedia](https://en.wikipedia.org/wiki/ECMAScript#6th_Edition_-_ECMAScript_2015): | | 10 | +The 6th edition, officially known as ECMAScript 2015, was finalized in June 2015. This update adds significant new syntax for writing complex applications, including classes and modules, but defines them semantically in the same terms as ECMAScript 5 strict mode. Other new features include iterators and for/of loops, Python-style generators and generator expressions, arrow functions, binary data, typed arrays, collections (maps, sets and weak maps), promises, number and math enhancements, reflection, and proxies (metaprogramming for virtual objects and wrappers). The complete list is extensive. | 7 | 11 |
| | 12 | +Browser support for ES6 is still incomplete. However, ES6 code can be transpiled into ES5 code, which has more consistent support across browsers. Transpiling adds an extra step to your build process whereas polyfills allow you to add extra functionalities by including another javascript file. | | 13 | + | 8 | 14 | # Course Documentation | 9 | 15 |
| 10 | | -(this for me to fill up with every element that you use in lessons. syntax explaination and links for more) | 11 | | - | 12 | | -## Element to explain | 13 | | - | 14 | | -(for example console.log) | 15 | | - | 16 | 16 | ##Javascript functions | 17 | 17 |
| 18 | 18 | According to W3schools: | @@ -46,7 +46,74 @@ Function **parameters** are the **names** listed in the function definition. | 46 | 46 |
| 47 | 47 | Function **arguments** are the real **values** received by the function when it is invoked. | 48 | 48 |
| 49 | | -Inside the function, the arguments behave as local variables. | | 49 | +Inside the function, the arguments behave as local variables. | | 50 | + | | 51 | +## Arrays | | 52 | + | | 53 | +Arrays are a special type of objects that are getting accessed through numbers from zero up to N-1. Arrays are easy to be recognized from their typical syntax: | | 54 | + | | 55 | + Array_name[0] = the value of the first place | | 56 | + | | 57 | + According [Wikipedia](https://en.wikipedia.org/wiki/Array_data_structure): | | 58 | + *"In computer science, an array data structure, or simply an array, is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key. An array is stored so that the position of each element can be computed from its index tuple by a mathematical formula."* | | 59 | + | | 60 | +Now in our example: | | 61 | + | | 62 | + var food = ['bacon', 'corn', 'ham', 'sausage']; | | 63 | + | | 64 | +We see the initiation through the typical aray syntax: | | 65 | + | | 66 | + | | 67 | + var arrayname = ['first_Element_of_the_Array', 'second_Element_of_the_Array', 'third_Element_of_the_Array', etc... ] | | 68 | + | | 69 | +The most important thing that we need to know about arrays is that Arrays are start counting from 0 instead of 1, (starting counting from 0 is very typical behavior for computers because of the binary system of counting that computer are based of). | | 70 | +That means that for a N entries in an Array we ae counting the places from zero until the N-1th place. | | 71 | +For example to access the 5th element of an array we are typing: | | 72 | + | | 73 | + arrayname[4] | | 74 | + | | 75 | +In our example we used few statments that we should explain bit further: | | 76 | + | | 77 | +**Push and Pop** | | 78 | +Push adds new item to the end of an array | | 79 | + | | 80 | + food.push('tuna'); | | 81 | + console.log(food); | | 82 | + | | 83 | +while pop removes and item from the end of an array. | | 84 | + | | 85 | + var lastItem = food.pop(); | | 86 | + console.log(lastItem); | | 87 | + console.log(food); | | 88 | +For both Push and Pop please feel free to check bellow about stacks. | | 89 | + | | 90 | +**Simple Iteration** | | 91 | +The way to iterate elements in javascript arrays is pretty straight forward: | | 92 | + | | 93 | + console.log(food[2]); | | 94 | + | | 95 | +Array values are retrieved by index (starting at 0 not 1). | | 96 | + | | 97 | +Iteration through loop | | 98 | +The best way to iterate an array is mathematically through a loop, like the example bellow: | | 99 | + | | 100 | + // you can iterate over an array to access each individual element | | 101 | + for(var i=0; i<food.length; i++){ | | 102 | + console.log(i, food[i]); | | 103 | + } | | 104 | + | | 105 | + The simplest type of data structure is a linear array, also called one-dimensional array. For more informations about Arrays please visit the links below: | | 106 | +[Array data structure (Wikipedia)](https://en.wikipedia.org/wiki/Array_data_structure) | | 107 | +[JavaScript Arrays (w3Schools)](http://www.w3schools.com/js/js_arrays.asp) | | 108 | +## Stacks | | 109 | + | | 110 | +A stack is a data structure that can be logically thought of as a real physical stack or pile, a structure where | | 111 | +insertion and deletion of items takes place at one end only called the "top" of the stack. The basic concept can be | | 112 | +illustrated by thinking of your data set as a stack of plates or books where you can only take the top item off the | | 113 | +stack in order to remove things from it. | | 114 | + | | 115 | + | | 116 | + | 50 | 117 |
| 51 | 118 | #The New Boston | 52 | 119 | ## Links | @@ -56,5 +123,5 @@ Inside the function, the arguments behave as local variables. | 56 | 123 | - [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/) | 57 | 124 | - [Twitter](https://twitter.com/bucky_roberts) | 58 | 125 | - [Google+](https://plus.google.com/+BuckyRoberts) | 59 | | -- [reddit](https://www.reddit.com/r/thenewboston/) | | 126 | +- [reddit](https://www.reddit.com/r/thenewboston/) | 60 | 127 | > Written with [StackEdit](https://stackedit.io/). |
Collapse file Copy file name to clipboardExpand all lines: Data_Structures/Arrays/New_ES6_Features_2/README.md +80-11Lines changed: 80 additions & 11 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 |  | 2 | 2 |
| 3 | 3 | # New ES6 features part 2 | 4 | | -This MD file serves as example/template. It will be filled up soon. | 5 | | - | 6 | | -(for Bucky to fill up) | | 4 | + | | 5 | +According to [Wikipedia](https://en.wikipedia.org/wiki/ECMAScript): | | 6 | +ECMAScript (or ES) is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262. It was based on JavaScript, which now tracks ECMAScript. It is commonly used for client-side scripting on the World Wide Web. | | 7 | + | | 8 | + | | 9 | +##6th Edition - ECMAScript 2015 | | 10 | +According to [Wikipedia](https://en.wikipedia.org/wiki/ECMAScript#6th_Edition_-_ECMAScript_2015): | | 11 | +The 6th edition, officially known as ECMAScript 2015, was finalized in June 2015. This update adds significant new syntax for writing complex applications, including classes and modules, but defines them semantically in the same terms as ECMAScript 5 strict mode. Other new features include iterators and for/of loops, Python-style generators and generator expressions, arrow functions, binary data, typed arrays, collections (maps, sets and weak maps), promises, number and math enhancements, reflection, and proxies (metaprogramming for virtual objects and wrappers). The complete list is extensive. | 7 | 12 |
| | 13 | +Browser support for ES6 is still incomplete. However, ES6 code can be transpiled into ES5 code, which has more consistent support across browsers. Transpiling adds an extra step to your build process whereas polyfills allow you to add extra functionalities by including another javascript file. | | 14 | + | 8 | 15 | # Course Documentation | 9 | 16 |
| 10 | | -(this for me to fill up with every element that you use in lessons. syntax explaination and links for more) | 11 | | - | 12 | | -## Element to explain | 13 | | - | 14 | | -(for example console.log) | 15 | | - | 16 | 17 | ##Javascript functions | 17 | 18 |
| 18 | 19 | According to W3schools: | @@ -46,7 +47,74 @@ Function **parameters** are the **names** listed in the function definition. | 46 | 47 |
| 47 | 48 | Function **arguments** are the real **values** received by the function when it is invoked. | 48 | 49 |
| 49 | | -Inside the function, the arguments behave as local variables. | | 50 | +Inside the function, the arguments behave as local variables. | | 51 | + | | 52 | +## Arrays | | 53 | + | | 54 | +Arrays are a special type of objects that are getting accessed through numbers from zero up to N-1. Arrays are easy to be recognized from their typical syntax: | | 55 | + | | 56 | + Array_name[0] = the value of the first place | | 57 | + | | 58 | + According [Wikipedia](https://en.wikipedia.org/wiki/Array_data_structure): | | 59 | + *"In computer science, an array data structure, or simply an array, is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key. An array is stored so that the position of each element can be computed from its index tuple by a mathematical formula."* | | 60 | + | | 61 | +Now in our example: | | 62 | + | | 63 | + var food = ['bacon', 'corn', 'ham', 'sausage']; | | 64 | + | | 65 | +We see the initiation through the typical aray syntax: | | 66 | + | | 67 | + | | 68 | + var arrayname = ['first_Element_of_the_Array', 'second_Element_of_the_Array', 'third_Element_of_the_Array', etc... ] | | 69 | + | | 70 | +The most important thing that we need to know about arrays is that Arrays are start counting from 0 instead of 1, (starting counting from 0 is very typical behavior for computers because of the binary system of counting that computer are based of). | | 71 | +That means that for a N entries in an Array we ae counting the places from zero until the N-1th place. | | 72 | +For example to access the 5th element of an array we are typing: | | 73 | + | | 74 | + arrayname[4] | | 75 | + | | 76 | +In our example we used few statments that we should explain bit further: | | 77 | + | | 78 | +**Push and Pop** | | 79 | +Push adds new item to the end of an array | | 80 | + | | 81 | + food.push('tuna'); | | 82 | + console.log(food); | | 83 | + | | 84 | +while pop removes and item from the end of an array. | | 85 | + | | 86 | + var lastItem = food.pop(); | | 87 | + console.log(lastItem); | | 88 | + console.log(food); | | 89 | +For both Push and Pop please feel free to check bellow about stacks. | | 90 | + | | 91 | +**Simple Iteration** | | 92 | +The way to iterate elements in javascript arrays is pretty straight forward: | | 93 | + | | 94 | + console.log(food[2]); | | 95 | + | | 96 | +Array values are retrieved by index (starting at 0 not 1). | | 97 | + | | 98 | +Iteration through loop | | 99 | +The best way to iterate an array is mathematically through a loop, like the example bellow: | | 100 | + | | 101 | + // you can iterate over an array to access each individual element | | 102 | + for(var i=0; i<food.length; i++){ | | 103 | + console.log(i, food[i]); | | 104 | + } | | 105 | + | | 106 | + The simplest type of data structure is a linear array, also called one-dimensional array. For more informations about Arrays please visit the links below: | | 107 | +[Array data structure (Wikipedia)](https://en.wikipedia.org/wiki/Array_data_structure) | | 108 | +[JavaScript Arrays (w3Schools)](http://www.w3schools.com/js/js_arrays.asp) | | 109 | +## Stacks | | 110 | + | | 111 | +A stack is a data structure that can be logically thought of as a real physical stack or pile, a structure where | | 112 | +insertion and deletion of items takes place at one end only called the "top" of the stack. The basic concept can be | | 113 | +illustrated by thinking of your data set as a stack of plates or books where you can only take the top item off the | | 114 | +stack in order to remove things from it. | | 115 | + | | 116 | + | | 117 | + | 50 | 118 |
| 51 | 119 | #The New Boston | 52 | 120 | ## Links | @@ -56,5 +124,6 @@ Inside the function, the arguments behave as local variables. | 56 | 124 | - [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/) | 57 | 125 | - [Twitter](https://twitter.com/bucky_roberts) | 58 | 126 | - [Google+](https://plus.google.com/+BuckyRoberts) | 59 | | -- [reddit](https://www.reddit.com/r/thenewboston/) | | 127 | +- [reddit](https://www.reddit.com/r/thenewboston/) | | 128 | + | 60 | 129 | > Written with [StackEdit](https://stackedit.io/). |
|