About a minute read.
Description
The includes()
method checks if an element exists in an array and will return a boolean
. As you may have guessed, it returns true
if the array has the value and it returns false
if the array does not contain the value.
Syntax
Parameters
searchElement
The value that you're checking for in the array.
fromIndex
(optional)
The index in which to start searching for searchElement
. If no value is provided, this method will search from the beginning of the array.
Return Value
This method will return true
if the tested array includes the given value, otherwise it will return false
.
More stuff I've written
Jakob’s Law and How To Use It
Jakob’s law is the most well-known of the Laws of UX and in this post, you’ll learn what it says and how to use it to design usable websites.
Read This PostMoving From WordPress to Forestry
How moving from WordPress to Forestry drastically improved my productivity, developer experience and allowed me to work with more modern technology.
Read This PostPractical Advice For Non-Designers Part One: User Experience
This is part one of a two part series that aims to give non-designers some very high-level, practical advice for designing websites. This part focuses on overall user experience.
Read This PostLet's work together
Elevate your online presence with a user-focused website. Reach out for a discovery call & let's turn your ideas into a stunning digital experience.