JSFiddle - React, Tailwind, and code Playground

by ppgab

JavaScript

kw = ['a', 'b', 'c'];

value = 'oi';

i = kw.find(w => value.includes(w));

alert(i);