Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Constructor for items
- shop.addItem = function(title, description, price) {
- 'use strict';
- this.title = title;
- this.description = description;
- this.price = price;
- //Adds values from contructor to array
- //Adds values from contructor to array
- shop.items.push({title: this.item, description: this.description, price: this.price});
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement