Tables #2


6 points



This exercise makes 3 improvements to the app you developed in Tables #1:

- The app displays records that partially match what the user types into the search box. For example, if the user types "Beatles," the correct records display even though the full name of the band is "The Beatles." To get this to work, replace the parameter "{Artist:artist}" with "{}". This blank filter allows all 500 rows in the table to be pulled from the table and stored in the list 'records.' Then, inside a FOR loop that accesses one record at a time, use an IF statement to check if "records[k].Album" includes the word that the user entered in the search box. If it does, you can include the album in the output. You can use the 'includes()' function to check if one string 'includes' another string. [For example, 'Monday'.includes('Mon') is 'true' but 'Monday'.includes('Tues') is 'false'.]

- The first line printed to the Label is the name of the band.

- If the artist does not appear in the Rolling Stone table, a message like "No match." is displayed in the Text Area.


Here is some documentation:




The video shows what a completed app should do.