Skip to content
Recommend our themes and earn 30% of our share of every sale you bring. Free to join.Earn by recommending our themes Become an affiliate

Check if value exists in array jquery

Updated 20 Jul 2018

Source code

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

More code answers

Comments

Log in to leave a comment.