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:
2424``` js
2525let user = { name: " John" , years: 30 };
2626
27- // your code to the left side :
27+ // tu código al lado izquierdo :
2828// ... = user
2929
3030alert ( name ); // John
Original file line number Diff line number Diff line change 11describe ( "topSalary" , function ( ) {
2- it ( "returns top-paid person " , function ( ) {
2+ it ( "devuelvo persona mejor pagada " , function ( ) {
33 let salaries = {
44 "John" : 100 ,
55 "Pete" : 300 ,
@@ -9,7 +9,7 @@ describe("topSalary", function() {
99 assert . equal ( topSalary ( salaries ) , "Pete" ) ;
1010 } ) ;
1111
12- it ( "returns null for the empty object " , function ( ) {
12+ it ( "devuelve null para objeto vacío " , function ( ) {
1313 assert . isNull ( topSalary ( { } ) ) ;
1414 } ) ;
1515} ) ;
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ importance: 5
22
33---
44
5- # The maximal salary
5+ # El salario máximo
66
7- There is a ` salaries ` object :
7+ Hay un objeto ` salaries ` :
88
99``` js
1010let salaries = {
@@ -14,9 +14,9 @@ let salaries = {
1414};
1515```
1616
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 .
1818
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 .
2121
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