Playing With Array on Javascript
I’m not a FrontEnd Web Developer. So it’s kind of a note for me.
I have this simple list, or array.
I always use list or array to store data, and sometimes i need to check if some value is already exists on the list. Sometimes i need to check if an index has already exists on the list.
How to check if some value has already exists?
How to check if some index has already exists?
That’s it. Well, it’s not the only way of course. You may have another way to check or playing with an array in JavaScript.
One thing, i used ===
so it compared not only the value but the type of the data too.
Some people might say that using ===
are not wise, but hey you can use ==
on above example. ;)
Read other posts