File tree Expand file tree Collapse file tree 4 files changed +138
-155
lines changed
1-js/05-data-types/10-destructuring-assignment Expand file tree Collapse file tree 4 files changed +138
-155
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ Here's an example of the values after your assignment:
24
24
``` js
25
25
let user = { name: " John" , years: 30 };
26
26
27
- // your code to the left side :
27
+ // tu código al lado izquierdo :
28
28
// ... = user
29
29
30
30
alert ( name ); // John
Original file line number Diff line number Diff line change 1
1
describe ( "topSalary" , function ( ) {
2
- it ( "returns top-paid person " , function ( ) {
2
+ it ( "devuelvo persona mejor pagada " , function ( ) {
3
3
let salaries = {
4
4
"John" : 100 ,
5
5
"Pete" : 300 ,
@@ -9,7 +9,7 @@ describe("topSalary", function() {
9
9
assert . equal ( topSalary ( salaries ) , "Pete" ) ;
10
10
} ) ;
11
11
12
- it ( "returns null for the empty object " , function ( ) {
12
+ it ( "devuelve null para objeto vacío " , function ( ) {
13
13
assert . isNull ( topSalary ( { } ) ) ;
14
14
} ) ;
15
15
} ) ;
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ importance: 5
2
2
3
3
---
4
4
5
- # The maximal salary
5
+ # El salario máximo
6
6
7
- There is a ` salaries ` object :
7
+ Hay un objeto ` salaries ` :
8
8
9
9
``` js
10
10
let salaries = {
@@ -14,9 +14,9 @@ let salaries = {
14
14
};
15
15
```
16
16
17
- Create the function ` topSalary(salaries) ` that returns the name of the top-paid person .
17
+ Crear la función ` topSalary(salaries) ` que devuelva el nombre de la persona mejor pagada .
18
18
19
- - If ` salaries ` is empty, it should return ` null ` .
20
- - If there are multiple top-paid persons, return any of them .
19
+ - Si ` salaries ` es vacío, debería devolver ` null ` .
20
+ - Si hay varias personas con mejor paga, devolver cualquiera de ellos .
21
21
22
- P.S. Use ` Object.entries ` and destructuring to iterate over key/value pairs .
22
+ PD: Utilice ` Object.entries ` y desestructuración para iterar sobre pares de propiedades/valores .
You can’t perform that action at this time.
0 commit comments