Skip to content

Commit dbc68ca

Browse files
committed
Iteration ironhack-labs#5 complete.
1 parent 944bdd6 commit dbc68ca

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/functions-and-arrays.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,14 @@ const wordsUnique = [
108108
'bring'
109109
];
110110

111-
function uniquifyArray() {}
111+
function uniquifyArray(arr) {
112+
if (arr.length === 0) {
113+
return null;
114+
} else {
115+
let words = [...new Set(arr)];
116+
return words;
117+
}
118+
}
112119

113120

114121

0 commit comments

Comments
 (0)