We have a lot of array methods in JavaScript but in this blog you are gonna see only the most useful methods and after reading this, I am pretty su...
For further actions, you may consider blocking this person and/or reporting abuse
indexOf is good when you need the index. If you just want to know whether the value is in the array or not, you then have to test the result against -1. Alternatively you could use .includes() to get true or false directly.
Yup that’s correct! But indexOf tells you precisely where the value is found…✅
Just a reminder that arrow functions are not just another syntax. An alternative expression with limited use.
developer.mozilla.org/en-US/docs/W...
Thanks for this post. I just finally understood reduce method😊
Awesome 😇
Thanks bro!
That's not true, sort modifies the array in place
Also, how to make these code snippets images?
Copy and Paste your code in this website : carbon.now.sh/
Thanks 👍 .
I am still confused about the methods .
confused about methods discussed in this blog?? or the term method?
I am not getting how the sort function adds the elements to a new array based on return value 1 or -1. Can you please explain this?
That is how the sort function is made...you just have to give it a variable, and if the values matches then it will get pushed into the new variable we created.
It's very helpful to me Keep it up bro 🔥
Thanks bro