assets/javascript/app.js
// Add buttons for original animals array,render button first
Add buttons for original animals array,render button first
Add buttons for original animals array render button first
function renderButtons() {
    event.preventDefault();
    $("#animal-buttons").empty();
    for (i = 0; i < animals.length; i++) {
      $("#animal-buttons").append(
        "<button class='btn btn-secondary' data-animal='" +
          animals[i] +
          "'>" +
          animals[i] +
          "</button>"
      );
    }
  }
function renderButtons ( ) { event . preventDefault ( ) ; $ ( "#animal-buttons" ) . empty ( ) ; for ( i = 0 ; i < animals . length ; i ++ ) { $ ( "#animal-buttons" ) . append ( "<button class='btn btn-secondary' data-animal='" + animals [ i ] + "'>" + animals [ i ] + "</button>" ) ; } }
Add buttons for original animals array,render button first
Add buttons for original animals array render button first