function sortById(pokemonArray) {
  pokemonArray.sort(function(a, b) {
    let numA = Number(a.id);
    let numB = Number(b.id);

    if (numA < numB) {
      return -1;
    }
    else {
      return 1;
    }
  })
}
/**
 * Takes an array and sorts it by increasing ID values.
 * (Wanted to use this to display the Pokemon in order on the homepage, but had trouble making it run after the first fetch() call)
 * @param {object} pokemonArray 
 */
Takes an array and sorts it by increasing ID values.
(Wanted to use this to display the Pokemon in order on the homepage, but had trouble making it run after the first fetch() call)
@param {object} pokemonArray
Takes an array and sorts it by increasing ID values . ( Wanted to use this to display the Pokemon in order on the homepage but had trouble making it run after the first fetch () call ) @param { object } pokemonArray
function sortById(pokemonArray) {
  pokemonArray.sort(function(a, b) {
    let numA = Number(a.id);
    let numB = Number(b.id);
    if (numA < numB) {
      return -1;
    }
    else {
      return 1;
    }
  })
}
function sortById ( pokemonArray ) { pokemonArray . sort ( function ( a , b ) { let numA = Number ( a . id ) ; let numB = Number ( b . id ) ; if ( numA < numB ) { return - 1 ; } else { return 1 ; } } ) }
Takes an array and sorts it by increasing ID values.
Takes an array and sorts it by increasing ID values .