-
Notifications
You must be signed in to change notification settings - Fork 228
Array methods #316
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
Array methods #316
Changes from 12 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
ea23430
Update article.md
nahuelcoder 1a5fbd5
Update article.md
nahuelcoder 77e3e5b
Updated article.md
nahuelcoder 2568298
Updated article
nahuelcoder 71a37c7
Updated article
nahuelcoder 1c33c51
Updated article
nahuelcoder 1836c4a
Updated traslation
nahuelcoder f49120e
Updated traslation
nahuelcoder 11e85cf
Updated traslation
nahuelcoder e983eb0
Updated article
nahuelcoder 6154afd
Updated traslation
nahuelcoder a866495
Merge pull request #2 from nahuelcoder/nahuelcoder-patch-1-Array-methods
nahuelcoder 4610c80
Update task.md
nahuelcoder 415c6d3
Update solution.js
nahuelcoder d4f3cf3
Update task.md
nahuelcoder 9d676cd
Update 1-js/05-data-types/05-array-methods/11-array-unique/solution.md
nahuelcoder 42a081e
Update 1-js/05-data-types/05-array-methods/12-reduce-object/task.md
nahuelcoder aeca5bf
Update 1-js/05-data-types/05-array-methods/12-reduce-object/task.md
nahuelcoder 2c7509d
Update 1-js/05-data-types/05-array-methods/3-filter-range-in-place/ta…
nahuelcoder 6534a30
Update 1-js/05-data-types/05-array-methods/6-calculator-extendable/so…
nahuelcoder a28bdfa
Update 1-js/05-data-types/05-array-methods/6-calculator-extendable/ta…
nahuelcoder 88b688a
Update 1-js/05-data-types/05-array-methods/7-map-objects/solution.md
nahuelcoder 77c3aa5
Update 1-js/05-data-types/05-array-methods/7-map-objects/solution.md
nahuelcoder 55ffb74
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder bd70974
Update 1-js/05-data-types/05-array-methods/9-shuffle/solution.md
nahuelcoder ea5b99c
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder a294675
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder 28b7b22
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder d047c86
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder 0667f15
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder 3efcd54
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder 5b9c37c
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder 2792030
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder bfa2c55
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder e62eee8
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder 458f3f6
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder 5f8f106
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder beba4b1
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder b8e291c
Update 1-js/05-data-types/05-array-methods/article.md
nahuelcoder b070c86
Update 1-js/05-data-types/05-array-methods/11-array-unique/solution.md
vplentinax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
1-js/05-data-types/05-array-methods/1-camelcase/_js.view/solution.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
function camelize(str) { | ||
return str | ||
.split('-') // splits 'my-long-word' into array ['my', 'long', 'word'] | ||
.split('-') // separa 'my-long-word' en el array ['my', 'long', 'word'] | ||
.map( | ||
// capitalizes first letters of all array items except the first one | ||
// converts ['my', 'long', 'word'] into ['my', 'Long', 'Word'] | ||
// convierte en mayúscula todas las primeras letras de los elemntos del array excepto por el primero | ||
// convierte ['my', 'long', 'word'] en ['my', 'Long', 'Word'] | ||
(word, index) => index == 0 ? word : word[0].toUpperCase() + word.slice(1) | ||
) | ||
.join(''); // joins ['my', 'Long', 'Word'] into 'myLongWord' | ||
.join(''); // une ['my', 'Long', 'Word'] en 'myLongWord' | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
1-js/05-data-types/05-array-methods/2-filter-range/_js.view/solution.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
function filterRange(arr, a, b) { | ||
// added brackets around the expression for better readability | ||
// agregamos paréntesis en torno a la expresión para mayor legibilidad | ||
return arr.filter(item => (a <= item && item <= b)); | ||
} |
6 changes: 3 additions & 3 deletions
6
1-js/05-data-types/05-array-methods/2-filter-range/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
```js run demo | ||
function filterRange(arr, a, b) { | ||
// added brackets around the expression for better readability | ||
// agregamos paréntesis en torno a la expresión para mayor legibilidad | ||
return arr.filter(item => (a <= item && item <= b)); | ||
} | ||
|
||
let arr = [5, 3, 8, 1]; | ||
|
||
let filtered = filterRange(arr, 1, 4); | ||
|
||
alert( filtered ); // 3,1 (matching values) | ||
alert( filtered ); // 3,1 (valores dentro del rango) | ||
|
||
alert( arr ); // 5,3,8,1 (not modified) | ||
alert( arr ); // 5,3,8,1 (array original no modificado) | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
1-js/05-data-types/05-array-methods/5-copy-sort-array/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
1-js/05-data-types/05-array-methods/6-calculator-extendable/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
- Please note how methods are stored. They are simply added to `this.methods` property. | ||
- All tests and numeric conversions are done in the `calculate` method. In future it may be extended to support more complex expressions. | ||
- Por favor ten en cuenta como los métodos son almacenados. Simplemente son agregados a la propiedad `this.methods`. | ||
nahuelcoder marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Todos los test y conversiones son hechas con el método `calculate`. En el futuro puede ser extendido para soportar expresiones más complejas. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.