What is happening 🔥 What is causing it 🔥
How to reproduce the bug step by step
| // 1 - Create reduce function | |
| function reduce(arr, fn, acc){ | |
| // 5 - Iterate over each array value and reduce it with the accumulator into only one, assigning the result to the accumulator | |
| for(value of arr){ | |
| acc = fn(value, acc); | |
| } | |
| // 6 - Return the accumulator after iterates over each value of the array | |
| return acc; |
| // 1 - Create map function | |
| function map(array, fn){ | |
| let newArr = []; | |
| for (value of array){ | |
| newArr.push(fn(value)); | |
| } | |
| return newArr; | |
| } |
| function doWhenDataReceived(value){ | |
| // 4 - Call .next() passing the value from the Promise | |
| fetchFlow.next(value); | |
| } | |
| function* createFlow(){ | |
| // 5 - Assign the Promise fullfiled value to data const | |
| const data = yield fetch('https://twitter.com/api/paca/tweets'); | |
| // 6 - Console log the data value from the Promise | |
| console.log(data); |
| const arr = [0,1,0,2,0,3,0,4,0,5]; | |
| const arrZeroesFiltered = arr.filter((cv) => cv !== 0); | |
| /* | |
| * or if you know your arr will return just numbers | |
| * and not things like null or undefined | |
| * const arrZeroesFiltered = arr.filter(Boolean); | |
| */ | |
| const zeroes = arr.length - arrZeroesFiltered.length; |
| /* Search only for the specific name, excluding name extensions | |
| ** This example below will found | |
| ** | |
| ** <Anchor>Anchor Text</Anchor> | |
| ** | |
| ** <Anchor booleanProp>Anchor Text</Anchor> | |
| ** | |
| ** <Anchor prop="text">Anchor Text</Anchor> | |
| ** | |
| ** <Anchor prop={localProp}>Anchor Text</Anchor> |
| Image Shrinker | |
| Itau | |
| Snap Camera | |
| Translator | |
| Irvue | |
| Amphetamine | |
| Gifski |
| aerial iterm2 | |
| epic-games java | |
| figma jetbrains-toolbox | |
| firecamp microsoft-edge | |
| firefox phantomjs | |
| firefox-developer-edition spotmenu | |
| firefox-nightly steam | |
| font-fira-code stremio | |
| font-jetbrains-mono tidal | |
| google-chrome transmission |
| antibody gdbm libtool pcre2 sqlite | |
| asdf gettext libyaml phraseapp tree | |
| autoconf git mas pkg-config unixodbc | |
| automake htop nano postgresql@10 watchman | |
| bash icu4c ncdu python@3.8 wxmac | |
| coreutils jpeg ncurses readline xz | |
| ctop lazydocker openfortivpn redis zsh | |
| diff-so-fancy libpng openssl@1.1 ruby-build | |
| exa libtiff pcre snappy |