Guest User

Untitled

a guest
Jun 21st, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. function Equipment() {
  2. const Bag = [];
  3.  
  4. function addProduct() {
  5. for (var i=0; i < tools; i++) {
  6. Bag.push(tools.item1)
  7. }
  8. }
  9. }
  10.  
  11. function tools() {
  12. this.item1 = {
  13. name: "item1",
  14. price: 5,
  15. count: 10
  16. };
  17. this.item2 = {
  18. name: "item2",
  19. price: 15,
  20. count: 20
  21. };
  22. this.item3 = {
  23. name: "item3",
  24. price: 20,
  25. count: 30
  26. };
  27. this.item4 = {
  28. name: "item4",
  29. price: 30,
  30. count: 40
  31. };
  32. this.item5 = {
  33. name: "item5",
  34. price: 40,
  35. count: 50
  36. };
  37. }
  38. const equipment = new Equipment();
  39. const tools = new Tools(/* … */);
  40. equipment.addTools(tools)
Add Comment
Please, Sign In to add comment