Check if value exists in array jquery


Source Code:

<script>
	var arr = ["value", 4, "Pete", 8, "John" ];
	var index = jQuery.inArray( "value", arr );
	alert(index);
</script>

Buy us coffee

Reviews and Comments