Whether the array contains the specified element
the target array
the target to find
boolean
contains([1, 2], 2) // truecontains([1, 2], 3) // false Copy
contains([1, 2], 2) // truecontains([1, 2], 3) // false
2.2.1
Whether the array contains the specified element