check if value exists in array + php code example
Example 1: how to check if object exists in javascript
if (typeof maybeObject != "undefined") {
alert("GOT THERE");
}
Example 2: java check if element exists in array
// Convert to stream and test it
boolean result = Arrays.stream(alphabet).anyMatch("A"::equals);
if (result) {
System.out.println("Hello A");
}
Copy