g.js — graphical objects for JavaScript

containscontains

Determine if the list contains a given value.

var l = [10, 20, 30, 40];
g.contains(l, 20);

Parameters

  • l: The input list.
  • value: The value to look for.