diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html b/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html index 45e6744b3..201b32cf1 100644 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html +++ b/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html @@ -3,9 +3,9 @@ - + diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md b/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md index afed6a91d..47dfef8d7 100644 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md +++ b/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md @@ -2,11 +2,10 @@ importance: 5 --- -# Show an alert +# Pokaż alert -Create a page that shows a message "I'm JavaScript!". +Utwórz alert na stronie z treścią "Jestem JavaScript!". -Do it in a sandbox, or on your hard drive, doesn't matter, just ensure that it works. - -[demo src="solution"] +Zrób to gdziekolwiek np. w sandbox lub na dysku twardym. Upewnij się, że działa. +[demo src="solution"] \ No newline at end of file diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js index 4de725971..9ad8eb555 100644 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js +++ b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js @@ -1 +1 @@ -alert("I'm JavaScript!"); \ No newline at end of file +alert("Jestem JavaScript!"); \ No newline at end of file diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md index f42c41e6d..60d35819f 100644 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md +++ b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md @@ -1,8 +1,7 @@ -The HTML code: +Kod HTML: [html src="index.html"] -For the file `alert.js` in the same folder: - -[js src="alert.js"] +Dla pliku `alert.js` w tym samym folderze: +[js src="alert.js"] \ No newline at end of file diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md index 26168d6a7..4f7fab50e 100644 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md +++ b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md @@ -1,9 +1,9 @@ -importance: 5 +Trudność: 5 --- -# Show an alert with an external script +# Pokaż alert używając zewnętrznego skryptu -Take the solution of the previous task . Modify it by extracting the script content into an external file `alert.js`, residing in the same folder. +Weź rozwiązanie z poprzedniego zadania . Zmodyfikuj je wydzielając skrypt do osobnego pliku `alert.js`, znajdującego się w tym samym folderze. -Open the page, ensure that the alert works. +Otwórz stronę i upewnij się, że alert działa. \ No newline at end of file diff --git a/1-js/02-first-steps/01-hello-world/article.md b/1-js/02-first-steps/01-hello-world/article.md index 4c384da19..c66ca0606 100644 --- a/1-js/02-first-steps/01-hello-world/article.md +++ b/1-js/02-first-steps/01-hello-world/article.md @@ -1,17 +1,17 @@ # Hello, world! -This part of the tutorial is about core JavaScript, the language itself. Later on, you'll learn about Node.js and other platforms that use it. +Ta część tutoriala dotyczy jednego z fundamentów JavaScript. Później nauczysz się co nieco o Node.js i innych platformach, które go używają. -But we need a working environment to run our scripts and, since this book is online, the browser is a good choice. We'll keep the amount of browser-specific commands (like `alert`) to a minimum so that you don't spend time on them if you plan to concentrate on another environment (like Node.js). We'll focus on JavaScript in the browser in the [next part](/ui) of the tutorial. +Potrzebujemy działającego środowiska, żeby uruchomić nasze skrypty. Skoro jesteś na tej stronie online, przeglądarka będzie najlepszą opcją. Ograniczymy liczbę komend specyficznych dla przeglądarek do minimum (np. `alert`), jeśli planujesz się skoncentrować bardziej na innym środowisku (np. Node.js). Będziemy szczegółowo omawiać JavaScript w przeglądarce w [nastepnym rozdziale](/ui) tego tutoriala. -So first, let's see how we attach a script to a webpage. For server-side environments (like Node.js), you can execute the script with a command like `"node my.js"`. +Więc najpierw zobaczmy w jaki sposób dołączyć skrypty do strony. Dla środowisk serwerowych (np. Node.js), możesz wykonać skrypt z pliku uruchamiając komendę `"node my.js"`. -## The "script" tag +## Tag "script" -JavaScript programs can be inserted into any part of an HTML document with the help of the ` */!* -

...After the script.

+

...Treść po skrypcie.

@@ -35,24 +35,23 @@ For instance: ``` ```online -You can run the example by clicking the "Play" button in the right-top corner of the box above. +Możesz kliknąć przycisk "Play" w prawym górnym rogu powyższego przykładu, aby uruchomić kod. ``` -The ` ``` - This trick isn't used in modern JavaScript. These comments hid JavaScript code from old browsers that didn't know how to process the ` ``` -Here, `/path/to/script.js` is an absolute path to the script file (from the site root). +W tym przypadku, `/path/to/script.js` to ścieżka absolutna do pliku ze skryptem (zaczynając od root-a strony). -You can also provide a relative path from the current page. For instance, `src="script.js"` would mean a file `"script.js"` in the current folder. +Możesz też wskazać ścieżkę relatywną od obecnej strony, na przykład: `src="script.js"` oznacza, że plik `"script.js"` jest w tym samym folderze co strona. -We can give a full URL as well. For instance: +Możesz również podać pełną ścieżkę URL. Na przykład: ```html ``` -To attach several scripts, use multiple tags: +Żeby dodać kilka plików ze skryptami użyj kilku tagów: ```html @@ -92,29 +91,29 @@ To attach several scripts, use multiple tags: ``` ```smart -As a rule, only the simplest scripts are put into HTML. More complex ones reside in separate files. +Z reguły do kodu HTML wstawiane są bardzo proste skrypty, a bardziej złożone reguły trzyma się w osobnych plikach. -The benefit of a separate file is that the browser will download it and store it in its [cache](https://en.wikipedia.org/wiki/Web_cache). +Zaletą posiadania skryptów w osobnych plikach jest to, że przeglądarka go pobierze i zapisze w swojej pamięci [cache](https://en.wikipedia.org/wiki/Web_cache). -Other pages that reference the same script will take it from the cache instead of downloading it, so the file is actually downloaded only once. +Jeśli inne strony muszą skorzystać z tych skryptów, a plik został już pobrany, robią to z pamięci podręcznej, zamiast pobierać go ponownie. -That reduces traffic and makes pages faster. +To znacznie przyspiesza działanie strony i redukuje niepotrzebny ruch. ``` -````warn header="If `src` is set, the script content is ignored." -A single ` ``` -We must choose either an external ` @@ -124,11 +123,11 @@ The example above can be split into two scripts to work: ``` ```` -## Summary +## Podsumowanie -- We can use a ``. +- Możesz użyć tagu ``. -There is much more to learn about browser scripts and their interaction with the webpage. But let's keep in mind that this part of the tutorial is devoted to the JavaScript language, so we shouldn't distract ourselves with browser-specific implementations of it. We'll be using the browser as a way to run JavaScript, which is very convenient for online reading, but only one of many. +Jest jeszcze wiele rzeczy do nauki w jaki sposób przeglądarki obsługują skrypty. Pamiętajmy jednak, że ta część poświęcona jest językowi JavaScript, więc nie skupiajmy się na działaniu przeglądarek. Będziemy używać przeglądarki jako narzędzia do uruchamiania JavaScript, co jest wygodne w przypadku czytania online, ale jest jednym z wielu sposobów. \ No newline at end of file diff --git a/1-js/02-first-steps/07-operators/article.md b/1-js/02-first-steps/07-operators/article.md index b3fbfd9bb..5ddcbf9b9 100644 --- a/1-js/02-first-steps/07-operators/article.md +++ b/1-js/02-first-steps/07-operators/article.md @@ -1,6 +1,6 @@ -# Operators +# Operatory -We know many operators from school. They are things like addition `+`, multiplication `*`, subtraction `-`, and so on. +Znamy wiele operatorów ze szkoły. We know many operators from school. They are things like addition `+`, multiplication `*`, subtraction `-`, and so on. In this chapter, we'll concentrate on aspects of operators that are not covered by school arithmetic.