Skip to content
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

Destructuring assignment #259

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d4ab65a
traducción destructuring assignment
EzequielCaste Jun 17, 2020
7c134ff
add 1 5 10 1
EzequielCaste Jul 6, 2020
f6f92be
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
98969fb
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
2b3aebe
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
166c158
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
fca6843
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
2ce0af2
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
9b09899
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
e145df9
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
a0865f9
corrección línea 142 143 article
EzequielCaste Jul 6, 2020
a1a5339
Merge branch 'destructuring-assig' of https://github.com/ezzep66/es.j…
EzequielCaste Jul 6, 2020
765ff70
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
a04ca4f
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
9e7ba34
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
c2464ea
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
a9f09d2
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
6172fb3
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
9764be7
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
757ac91
Update 1-js/05-data-types/10-destructuring-assignment/article.md
EzequielCaste Jul 6, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Here's an example of the values after your assignment:
```js
let user = { name: "John", years: 30 };

// your code to the left side:
// tu código al lado izquierdo:
// ... = user

alert( name ); // John
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe("topSalary", function() {
it("returns top-paid person", function() {
it("devuelvo persona mejor pagada", function() {
let salaries = {
"John": 100,
"Pete": 300,
Expand All @@ -9,7 +9,7 @@ describe("topSalary", function() {
assert.equal( topSalary(salaries), "Pete" );
});

it("returns null for the empty object", function() {
it("devuelve null para objeto vacío", function() {
assert.isNull( topSalary({}) );
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ importance: 5

---

# The maximal salary
# El salario máximo

There is a `salaries` object:
Hay un objeto `salaries`:

```js
let salaries = {
Expand All @@ -14,9 +14,9 @@ let salaries = {
};
```

Create the function `topSalary(salaries)` that returns the name of the top-paid person.
Crear la función `topSalary(salaries)` que devuelva el nombre de la persona mejor pagada.

- If `salaries` is empty, it should return `null`.
- If there are multiple top-paid persons, return any of them.
- Si `salaries` es vacío, debería devolver `null`.
- Si hay varias personas con mejor paga, devolver cualquiera de ellos.

P.S. Use `Object.entries` and destructuring to iterate over key/value pairs.
PD: Utilice `Object.entries` y desestructuración para iterar sobre pares de propiedades/valores.
Loading