Skip to content

Commit 2283adc

Browse files
author
Adria Vieira
committed
Task copy-and-sort translated
1 parent 0d4eebb commit 2283adc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

1-js/05-data-types/05-array-methods/5-copy-sort-array/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
We can use `slice()` to make a copy and run the sort on it:
1+
Podemos usar `slice()` para fazer a cópia e executar o método `sort()` logo depois:
22

33
```js run
44
function copySorted(arr) {

1-js/05-data-types/05-array-methods/5-copy-sort-array/task.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ importance: 5
22

33
---
44

5-
# Copy and sort array
5+
# Copie e ordene o array
66

7-
We have an array of strings `arr`. We'd like to have a sorted copy of it, but keep `arr` unmodified.
7+
Temos um array de strings `arr`. Gostaríamos de ter uma copia ordenada desse array, porém mantenha `arr` do mesmo jeito, sem modificações.
88

9-
Create a function `copySorted(arr)` that returns such a copy.
9+
Crie uma função `copySorted(arr)` que retorna a copia.
1010

1111
```js
1212
let arr = ["HTML", "JavaScript", "CSS"];
1313

1414
let sorted = copySorted(arr);
1515

1616
alert( sorted ); // CSS, HTML, JavaScript
17-
alert( arr ); // HTML, JavaScript, CSS (no changes)
17+
alert( arr ); // HTML, JavaScript, CSS (arr sem alterções)
1818
```

0 commit comments

Comments
 (0)