anchor.diff:          })
   
           $.get('/events/<%= @event.id %>.json', function(gifts) {
  -
  -          const sortedGifts = gifts.sort( function( a, b ) {
  -              a = a.name.toLowerCase();
  -              b = b.name.toLowerCase();
  -
  -              return a < b ? -1 : a > b ? 1 : 0;
  -          });
  +          const sortedGifts = sortArray(gifts)
   
             sortedGifts.forEach(function(g) {
               let gift = new Gift(g.id, g.name, g.givers)
   
               gift.appendGiftName(gift.id)
   
  -            const sortedGivers = gift.givers.sort( function( a, b ) {
  -                a = a.name.toLowerCase();
  -                b = b.name.toLowerCase();
  -
  -                return a < b ? -1 : a > b ? 1 : 0;
  -            });
  +            const sortedGivers = sortArray(gift.givers)
   
               sortedGivers.forEach(function(giv) {
                 gift.appendGivers(gift.id, giv.id, giv)
  
positive.code: </script>
  
  <!--submit new gift-->
  <script>
    class Gift {
      constructor(id, name, givers) {
        this.id = id;
  
negative.code:       });
      }
  
      appendGiftName(giftID) {
        $("#gift_name_" + giftID).html(this.name)
      }
  
      appendGivers(giftID, givID, giver) {
        $("#gift_" + giftID + "_giver_" + givID + " a").text(giver.name)
      }
    }
  
    $('#js-gift-form-div').on('submit', function(event) {
      event.preventDefault();
      //this => button
      const values = $("#new_gift", this).serialize();
  
      const posting = $.post(`/events/<%= @event.id %>/gifts`, values);
  