JSFiddle - React, Tailwind, and code Playground

HTML

<div id="st-panelTitle"></div>
<input type="button" class="arrowNext" value="next" />

JavaScript

var panelTitleArray = [
  'Bacon &amp; Cheddar Mash', 
  'Chipotle &amp; Cilantro Mash',
  'Pesto Mash', 
  'Pancetta &amp; Rosemary Mash', 
  'Taco Seasoning &amp; Cheddar Mash',
  'Roasted Garlic Mash',
  'Sour Cream &amp; Chives Mash',
  'Corn &amp; Red Pepper Flakes Mash',
  'Ranch Dressing Mash',
  'Broccoli &amp; Cheddar Mash',
  'Old Bay Seasoning Mash', 
  'Smoked Gouda &amp; Scallions Mash', 
  'BBQ Mash',
  'Horseradish &amp; Chive Mash',
  'Parmesan Mash',
  'Corn, Broccoli &amp; Carrot Bits Mash',
  'Greek Yogurt Mash'
  ];

    var currentItem = 0;
    $("#st-panelTitle").html(panelTitleArray[currentItem]);
    $( '.arrowNext' ).click(function() {
        currentItem++;
        if(currentItem > panelTitleArray.length)
            currentItem = 0;
        $("#st-panelTitle").html(panelTitleArray[currentItem]);
    });