Skip to content

Commit

Permalink
update(JS): web/javascript/reference/global_objects/array/indexof
Browse files Browse the repository at this point in the history
  • Loading branch information
undead404 authored and AdriandeCita committed Jul 31, 2022
1 parent dfe1d1a commit bdbc90f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const indices = [];
const array = ['a', 'b', 'a', 'c', 'a', 'd'];
const element = 'a';
const idx = array.indexOf(element);
while (idx != -1) {
while (idx !== -1) {
indices.push(idx);
idx = array.indexOf(element, idx + 1);
}
Expand Down

0 comments on commit bdbc90f

Please sign in to comment.