JSFiddle - React, Tailwind, and code Playground

JavaScript

var name ='John Rock';
alert((/^John|Steve$/).test(name));