注目キーワード
  1. npm
  2. composer
  3. css

[JavaScript] in_arrayはArray.includesで行う

サンプルコード

import assert from "assert";

const list = [ 'A', 'B', 'C' ];
assert.equal(list.includes('A'), true);
assert.equal(list.includes('B'), true);
assert.equal(list.includes('C'), true);
assert.equal(list.includes('D'), false);