Tables #2

 

8 points

 

Introduction

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 "records." Then, inside a FOR loop that accesses one record at a time, 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 function "str.includes(str2)" to check if one string includes or contains another string.

- The first line printed to the Text Area 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.

 

 

Video

The video shows what a completed app should do.