Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- zad 1
- <!DOCTYPE html>
- <html lang="pl">
- <head>
- <meta charset="utf-8" />
- <script type="text/javascript">
- let prod1 =
- {
- name: "Mleko",
- price: 5,
- weight: 0.3
- }
- let prod2 =
- {
- name: "Ketchup",
- price: 3,
- weight: 0.2
- }
- document.write("Produkt numer jeden to: ",prod1.name,"<br>");
- document.write("Produkt numer jeden to: ",prod2.name,"<br>");
- document.write("Produkty kosztuja razem: ",prod2.price+prod1.price,"<br>");
- document.write("Produkty waza razem: ",prod2.weight+prod1.weight);
- </script>
- </head>
- <body>
- </body>
- </html>
- zad 2
- <!DOCTYPE html>
- <html lang="pl">
- <head>
- <meta charset="utf-8" />
- <script type="text/javascript">
- let currentUser =
- {
- name: "Michal",
- surname: "Pilarski",
- email: "michalpilarski17@gmail.com",
- www: "www.sampleText.com",
- userType: "Klient",
- show: function()
- {
- document.write("Imie: ",this.name,"<br>");
- document.write("Nazwisko: ",this.surname,"<br>");
- document.write("Mail: ",this.email,"<br>");
- document.write("Strona: ",this.www,"<br>");
- document.write("Rodzaj uzytkownika: ",this.userType,"<br>");
- }
- }
- currentUser.show();
- </script>
- </head>
- <body>
- </body>
- </html>
- zad 3
- <!DOCTYPE html>
- <html lang="pl">
- <head>
- <meta charset="utf-8" />
- <script type="text/javascript">
- let a = 0;
- let book =
- {
- title: "Wiedzmin",
- author: "Sapkowski",
- pageCount: "300",
- publisher: "ZSE",
- showDetails: function()
- {
- for (const key in book)
- {
- a++;
- if(a<5)
- {
- document.write(key," ",book[key],"<br>");
- }
- }
- }
- }
- book.showDetails();
- </script>
- </head>
- <body>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement