Advertisement
PiotrSzewczyk

Zadanie 1 obiekty

Feb 1st, 2021
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const prod1={
  2.     name:"Szklanka",
  3.     price:5,
  4.     weight:0.5
  5. }
  6.  
  7. const prod2={
  8.     name:"Lampa",
  9.     price:20,
  10.     weight:1
  11. }
  12. document.write("Produkt numer jeden to: "+prod1.name);
  13. document.write("<br>");
  14. document.write("Produkt numer dwa to: "+prod2.name);
  15. document.write("<br>");
  16. document.write("Produkty kosztują razem: "+(prod1.price+prod2.price)+" zł");
  17. document.write("<br>");
  18. document.write("Produkty ważą razem: "+(prod1.weight+prod2.weight)+" kg");
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement