JSFiddle - React, Tailwind, and code Playground
HTML
<div>test</div>
<div>test</div>
JavaScript
var actions = ['hide', 'show', 'fadeIn'];
$('div')[actions[0]]();
<div>test</div>
<div>test</div>
var actions = ['hide', 'show', 'fadeIn'];
$('div')[actions[0]]();