WDV221 Intro Javascript
12-1: Create JS objects
Use the following parallel arrays to create a set of objects:
let bookTitles = ["Beginning Javascript", "Logic with ES6", "Javascript Ojbects Made Easy"];
let bookPrices = [19.99, 29.49, 999.99];
let bookAuthor = ["Smith", "Johson-Parker", "Westin" ];
For you assignment:
- Use the javascript parallel arrays to create three Javascript objects called book1, book2, book3.
- For each object create a method called studentDiscountPrice( ). This method will display the book price discounted by 20%.
- Display the contents of each book object on the web page.
- Create a Javascript array called javascriptBooks. Load the book objects into the array.