05/10/2021
Hey everyone 🥳 It`s ours first post. We should try our best, so stay with us and learn everyday✍️
There will be small cheatsheets for your everyday usage. So just keep this page in your head and checkout for something new.
Lets start ! 🐢
Here is a small code part about Array Manipulating Methods in JavaScript :
Lets call bananas like b and apples like a, so :
arr[b,b,b,b].map(b=>a) --> [a,a,a,a] // We make apples from bananas ;
arr[b,b,a,b].filter(b) --> [b,b,b] // We filtered only bananas ;
arr[a,a,b,b].find(b) --> [b] // We just take bananas from Array;
arr[a,a,a,b].findIndexOf(b) --> [3] // We just find index of banana element;
arr[b,b,b,b].fill(1,a) --> [b,a,a,a] // We pull apples from index 1 to end;
arr[a,b,b,a].some(b) --> True // We checked if there are bananas in Array;
arr[b,b,b,a].every(b) --> False // We checked if there are only bananas in array.
You see ? It`s not hard enough. So stay with us and get ready for next POST 😎
See you soon 🙌