public/js/game.js
//function that will return array of three breeds pulled from DOG CEO API
function that will return array of three breeds pulled from DOG CEO API
function that will return array of three breeds pulled from DOG CEO API
function findThreeMoreBreed(){
  console.log("trying to find more breed names");
  breedList = [];
   try {
    $.ajax({
      type: 'GET',
      dataType: 'json',
      async: false,
      url:"https://dog.ceo/api/breeds/list/all",
      success: function(result) {
        var selection = showSelection(result.message);
        breedList = selection;
      }
    });
    return breedList;
  } 
  catch (e) {console.log(e.description);}
}
function findThreeMoreBreed ( ) { console . log ( "trying to find more breed names" ) ; breedList = [ ] ; try { $ . ajax ( { type : 'GET' , dataType : 'json' , async : false , url : "https://dog.ceo/api/breeds/list/all" , success : function ( result ) { var selection = showSelection ( result . message ) ; breedList = selection ; } } ) ; return breedList ; } catch ( e ) { console . log ( e . description ) ; } }
function that will return array of three breeds pulled from DOG CEO API
function that will return array of three breeds pulled from DOG CEO API
//ASYNC is false to wait for the breedlist to be updated //this is the DOG CEO api //documentation is at https://dog.ceo/dog-api/