We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47e7cf5 commit 08bab4dCopy full SHA for 08bab4d
src/functions-and-arrays.js
@@ -132,7 +132,23 @@ const wordsUnique = [
132
"bring",
133
];
134
135
-function uniquifyArray() {}
+function uniquifyArray(wordsArray) {
136
+ if (wordsArray.length == 0) {
137
+ return null
138
+ }
139
+ const uniquifiedArray = [];
140
+
141
+ for (let i = 0; i < wordsArray.length; i++) {
142
+ const word = wordsArray[i];
143
144
+ if (uniquifiedArray.indexOf(word) === -1) {
145
+ uniquifiedArray.push(word);
146
147
148
+ return uniquifiedArray
149
150
151
152
153
// Iteration #6: Find elements
154
const wordsFind = [
0 commit comments