The lodash _.includes method is one of the collection methods in lodash that will work with Arrays, and Objects in general, and even strings. The nature of the lodash includes method is that it can be used as a means to test if a value is included in a collection or not.
The includes method can be used as a way to find if a value is in an array, as it is a collection method that can be used with any object in general including arrays. In this case I just need to call the lodash includes method and pass an the array as the first argument followed by the value that I want to test if it is included or not.
When working with an object the method will return true if one of the object values is equal to the value given, but not with the key names.
Here I have an example of the _.includes method that is used to find if a string contains a given substring.
An index value can be given as the third argument to the method. This index value will be observed as a starting index value when it comes to checking the values from left to right.
When I give a negative from index value it counts as the index value from the end of the collection.