function newGifButtons() {
    var topicBtn = $(`<button> ${topics[topics.length-1]} </button>`);
    topicBtn.addClass("gif-btn btn btn-dark mb-2")
      topicBtn.attr("btn-topics", topics[topics.length-1]);
      $("#thing-btn").append(topicBtn);
  }
//function to generate a new button from last item in array 
function to generate a new button from last item in array
function to generate a new button from last item in array
function newGifButtons() {
    var topicBtn = $(`<button> ${topics[topics.length-1]} </button>`);
    topicBtn.addClass("gif-btn btn btn-dark mb-2")
      topicBtn.attr("btn-topics", topics[topics.length-1]);
      $("#thing-btn").append(topicBtn);
  }
function newGifButtons ( ) { var topicBtn = $ ( ` ${ topics [ topics . length - 1 ] } ` ) ; topicBtn . addClass ( "gif-btn btn btn-dark mb-2" ) topicBtn . attr ( "btn-topics" , topics [ topics . length - 1 ] ) ; $ ( "#thing-btn" ) . append ( topicBtn ) ; }
function to generate a new button from last item in array
function to generate a new button from last item in array