Anjan Dutta

In this article, I am going to describe 4 methods

- Using The indexOf() method
- Check if array includes a value in Javascript
- Check for NaN
- Check for Undefined

Using The indexOf() method

Using `indexOf()`, we can determine if an element is present in an array or not. Similar to the `includes()` method the `indexOf()` method also works on arrays and…

--

--

#javascript

Playing with strings in Javascript is a bit tricky. In this article, I am going to describe how to remove space from any string in Javascript.

Even though Javascript provides many inbuilt string functions, we must always aim for using the optimal one to solve any challenge.

Because JavaScript…

--

--