In: Computer Science
Using Visual Studio Code (JavaScript)
For this lab you must use a reasonable faceted search example, each item must have at least three categorical attributes and at least one numeric attribute. Attributes such as ID, name etc do not count as categorical or numeric attributes.
Exercise 1
(a) Define a class for your item that meets the above three categorical and one numeric attribute requirements.
(b) Create a text file that contains at least 5 such records in CSV format.
(c) Create a HTML page that contains a table element the shows one item record (hardcoded in the HTML).
(d) Add a script element into your HTML page that prints ‘hello’ to the browser’s JavaScript developer console.
(e) Add JavaScript code that uses ‘fetch’ into your HTML page that loads your item text file. Use a python initiated local server to serve that text file.