Is value in array - Node.js Array

Node.js examples for Array:Array Value

Description

Is value in array

Demo Code


function in_array(_value, _array){
  for(ii = 0; ii < _array.length; ii++){
    if(_value == _array[ii]){
      return true;
    }//from  www.j  a v a 2s  .  c  o  m
  }
  return false;
}

Related Tutorials