Unit 6 lesson 13 HACKATHON Project


Here is what I am trying to do

  1. pull from the Baseball Teams List just the first 15 team with a date of 1901.

  2. I added a column called Team Icon - URL link to Team Logo. I want this logo to show when a team is selected in the app.

  3. I have attached a link to my current code on this app.

  4. I have uploaded the CSV file for the Baseball Teams List with the added column.
    Unit 6 Lesson 13 Baseball Teams.csv (136.2 KB)

  5. I am not an expert at coding; more like a novice.

  6. I think the problem lies in the filtering function and the update screen function with the boolean expressions.

1 Like
  1. The list name on line 16 should be filteredTeamNameList not filterTeamNameList.
  2. Change line 36 from if (yearList[i] == yearList) to if (yearList[i] == 1901)
  3. Change line 50 to var index = randomNumber(0, filteredTeamNameList.length-1); You do not need the i++ (this is not a for loop).
  4. On line 52 remove the space between filteredTeamNameList and [index]. It should be setText(“teamNameOutput”, filteredTeamNameList[index]);