From daa1a2aff136fa9da1fcc97d7da97a2036fabc77 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:51:47 +0100 Subject: unslug uk: move --- files/uk/learn/javascript/asynchronous/index.html | 51 +++++++++++++++++++ .../uk/learn/javascript/building_blocks/index.html | 57 ++++++++++++++++++++++ .../index.html" | 51 ------------------- .../index.html" | 57 ---------------------- 4 files changed, 108 insertions(+), 108 deletions(-) create mode 100644 files/uk/learn/javascript/asynchronous/index.html create mode 100644 files/uk/learn/javascript/building_blocks/index.html delete mode 100644 "files/uk/learn/javascript/\320\260\321\201\320\270\320\275\321\205\321\200\320\276\320\275\320\275\320\270\320\271/index.html" delete mode 100644 "files/uk/learn/javascript/\320\261\321\203\320\264\321\226\320\262\320\265\320\273\321\214\320\275\321\226_\320\261\320\273\320\276\320\272\320\270/index.html" (limited to 'files/uk/learn/javascript') diff --git a/files/uk/learn/javascript/asynchronous/index.html b/files/uk/learn/javascript/asynchronous/index.html new file mode 100644 index 0000000000..3167a1f55a --- /dev/null +++ b/files/uk/learn/javascript/asynchronous/index.html @@ -0,0 +1,51 @@ +--- +title: Асинхронний JavaScript +slug: Learn/JavaScript/Асинхронний +translation_of: Learn/JavaScript/Asynchronous +--- +
{{LearnSidebar}}
+ +

In this module we take a look at {{Glossary("asynchronous")}} {{Glossary("JavaScript")}}, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.

+ +
+

Looking to become a front-end web developer?

+ +

We have put together a course that includes all the essential information you need to work towards your goal.

+ +

Get started

+
+ +

Prerequisites

+ +

Asynchronous JavaScript is a fairly advanced topic, and you are advised to work through JavaScript first steps and JavaScript building blocks modules before attempting this.

+ +

If you are not familiar with the concept of asynchronous programming, you should definitely start with the General asynchronous programming concepts article in this module. If you are, then you can probably skip to the Introducing asynchronous JavaScript module.

+ +
+

Note: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you can try out (most of) the code examples in an online coding program such as JSBin or Glitch.

+
+ +

Guides

+ +
+
General asynchronous programming concepts
+
+

In this article we'll run through a number of important concepts relating to asynchronous programming, and how this looks in web browsers and JavaScript. You should understand these concepts before working through the other articles in the module.

+
+
Introducing asynchronous JavaScript
+
In this article we briefly recap the problems associated with sychronous JavaScript, and take a first look at some of the different asynchronous JavaScript techniques you'll encounter, showing how they can help us solve such problems.
+
Cooperative asynchronous JavaScript: Timeouts and intervals
+
Here we look at the traditional methods JavaScript has available for running code asychronously after a set time period has elapsed, or at a regular interval (e.g. a set number of times per second), talk about what they are useful for, and look at their inherent issues.
+
Handling async operations gracefully with Promises
+
Promises are a comparatively new feature of the JavaScript language that allow you to defer further actions until after the previous action has completed, or respond to its failure. This is really useful for setting up a sequence of operations to work correctly. This article shows you how promises work, where you'll see them in use in WebAPIs, and how to write your own.
+
Making asynchronous programming easier with async and await
+
Promises can be somewhat complex to set up and understand, and so modern browsers have implemented async functions and the await operator. The former allows standard functions to implicitly behave asynchronously with promises, whereas the latter can be used inside async functions to wait for promises before the function continues. This makes chaining promises simpler and easier to read.
+
Choosing the right approach
+
To finish this module off, we'll consider the different coding techniques and features we've discussed throughout, looking at which ones you should use when, with recommendations and reminders of common pitfalls where appropriate.
+
+ +

See also

+ + diff --git a/files/uk/learn/javascript/building_blocks/index.html b/files/uk/learn/javascript/building_blocks/index.html new file mode 100644 index 0000000000..d4a6238d0f --- /dev/null +++ b/files/uk/learn/javascript/building_blocks/index.html @@ -0,0 +1,57 @@ +--- +title: Будівельні блоки JavaScript +slug: Learn/JavaScript/Будівельні_блоки +translation_of: Learn/JavaScript/Building_blocks +--- +
{{LearnSidebar}}
+ +

In this module, we continue our coverage of all JavaScript's key fundamental features, turning our attention to commonly-encountered types of code blocks such as conditional statements, loops, functions, and events. You've seen this stuff already in the course, but only in passing — here we'll discuss it all explicitly.

+ +
+

Looking to become a front-end web developer?

+ +

We have put together a course that includes all the essential information you need to work towards your goal.

+ +

Get started

+
+ +

Prerequisites

+ +

Before starting this module, you should have some familiarity with the basics of HTML and CSS, and you should have also worked through our previous module, JavaScript first steps.

+ +
+

Note: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as JSBin or Glitch.

+
+ +

Guides

+ +
+
Making decisions in your code — conditionals
+
In any programming language, code needs to make decisions and carry out actions accordingly depending on different inputs. For example, in a game, if the player's number of lives is 0, then it's game over. In a weather app, if it is being looked at in the morning, show a sunrise graphic; show stars and a moon if it is nighttime. In this article we'll explore how conditional structures work in JavaScript.
+
Looping code
+
Sometimes you need a task done more than once in a row. For example, looking through a list of names. In programming, loops perform this job very well. Here we will look at loop structures in JavaScript.
+
Functions — reusable blocks of code
+
Another essential concept in coding is functions. Functions allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times. In this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define functions, scope, and parameters.
+
Build your own function
+
With most of the essential theory dealt with previously, this article provides a practical experience. Here you'll get some practice with building up your own custom function. Along the way, we'll also explain some further useful details of dealing with functions.
+
Function return values
+
The last essential concept you must know about a function is return values. Some functions don't return a significant value after completion, but others do. It's important to understand what their values are, how to make use of them in your code, and how to make your own custom functions return useful values. 
+
Introduction to events
+
Events are actions or occurrences that happen in the system you are programming, which the system tells you about so you can respond to them in some way if desired. For example if the user clicks a button on a webpage, you might want to respond to that action by displaying an information box. In this final article we will discuss some important concepts surrounding events, and look at how they work in browsers.
+
+ +

Assessments

+ +

The following assessment will test your understanding of the JavaScript basics covered in the guides above.

+ +
+
Image gallery
+
Now that we've looked at the fundamental building blocks of JavaScript, we'll test your knowledge of loops, functions, conditionals and events by building a fairly common item you'll see on a lot of websites — a JavaScript-powered image gallery.
+
+ +

See also

+ +
+
Learn JavaScript
+
An excellent resource for aspiring web developers — Learn JavaScript in an interactive environment, with short lessons and interactive tests, guided by automated assessment. The first 40 lessons are free, and the complete course is available for a small one-time payment.
+
diff --git "a/files/uk/learn/javascript/\320\260\321\201\320\270\320\275\321\205\321\200\320\276\320\275\320\275\320\270\320\271/index.html" "b/files/uk/learn/javascript/\320\260\321\201\320\270\320\275\321\205\321\200\320\276\320\275\320\275\320\270\320\271/index.html" deleted file mode 100644 index 3167a1f55a..0000000000 --- "a/files/uk/learn/javascript/\320\260\321\201\320\270\320\275\321\205\321\200\320\276\320\275\320\275\320\270\320\271/index.html" +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Асинхронний JavaScript -slug: Learn/JavaScript/Асинхронний -translation_of: Learn/JavaScript/Asynchronous ---- -
{{LearnSidebar}}
- -

In this module we take a look at {{Glossary("asynchronous")}} {{Glossary("JavaScript")}}, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.

- -
-

Looking to become a front-end web developer?

- -

We have put together a course that includes all the essential information you need to work towards your goal.

- -

Get started

-
- -

Prerequisites

- -

Asynchronous JavaScript is a fairly advanced topic, and you are advised to work through JavaScript first steps and JavaScript building blocks modules before attempting this.

- -

If you are not familiar with the concept of asynchronous programming, you should definitely start with the General asynchronous programming concepts article in this module. If you are, then you can probably skip to the Introducing asynchronous JavaScript module.

- -
-

Note: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you can try out (most of) the code examples in an online coding program such as JSBin or Glitch.

-
- -

Guides

- -
-
General asynchronous programming concepts
-
-

In this article we'll run through a number of important concepts relating to asynchronous programming, and how this looks in web browsers and JavaScript. You should understand these concepts before working through the other articles in the module.

-
-
Introducing asynchronous JavaScript
-
In this article we briefly recap the problems associated with sychronous JavaScript, and take a first look at some of the different asynchronous JavaScript techniques you'll encounter, showing how they can help us solve such problems.
-
Cooperative asynchronous JavaScript: Timeouts and intervals
-
Here we look at the traditional methods JavaScript has available for running code asychronously after a set time period has elapsed, or at a regular interval (e.g. a set number of times per second), talk about what they are useful for, and look at their inherent issues.
-
Handling async operations gracefully with Promises
-
Promises are a comparatively new feature of the JavaScript language that allow you to defer further actions until after the previous action has completed, or respond to its failure. This is really useful for setting up a sequence of operations to work correctly. This article shows you how promises work, where you'll see them in use in WebAPIs, and how to write your own.
-
Making asynchronous programming easier with async and await
-
Promises can be somewhat complex to set up and understand, and so modern browsers have implemented async functions and the await operator. The former allows standard functions to implicitly behave asynchronously with promises, whereas the latter can be used inside async functions to wait for promises before the function continues. This makes chaining promises simpler and easier to read.
-
Choosing the right approach
-
To finish this module off, we'll consider the different coding techniques and features we've discussed throughout, looking at which ones you should use when, with recommendations and reminders of common pitfalls where appropriate.
-
- -

See also

- - diff --git "a/files/uk/learn/javascript/\320\261\321\203\320\264\321\226\320\262\320\265\320\273\321\214\320\275\321\226_\320\261\320\273\320\276\320\272\320\270/index.html" "b/files/uk/learn/javascript/\320\261\321\203\320\264\321\226\320\262\320\265\320\273\321\214\320\275\321\226_\320\261\320\273\320\276\320\272\320\270/index.html" deleted file mode 100644 index d4a6238d0f..0000000000 --- "a/files/uk/learn/javascript/\320\261\321\203\320\264\321\226\320\262\320\265\320\273\321\214\320\275\321\226_\320\261\320\273\320\276\320\272\320\270/index.html" +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Будівельні блоки JavaScript -slug: Learn/JavaScript/Будівельні_блоки -translation_of: Learn/JavaScript/Building_blocks ---- -
{{LearnSidebar}}
- -

In this module, we continue our coverage of all JavaScript's key fundamental features, turning our attention to commonly-encountered types of code blocks such as conditional statements, loops, functions, and events. You've seen this stuff already in the course, but only in passing — here we'll discuss it all explicitly.

- -
-

Looking to become a front-end web developer?

- -

We have put together a course that includes all the essential information you need to work towards your goal.

- -

Get started

-
- -

Prerequisites

- -

Before starting this module, you should have some familiarity with the basics of HTML and CSS, and you should have also worked through our previous module, JavaScript first steps.

- -
-

Note: If you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as JSBin or Glitch.

-
- -

Guides

- -
-
Making decisions in your code — conditionals
-
In any programming language, code needs to make decisions and carry out actions accordingly depending on different inputs. For example, in a game, if the player's number of lives is 0, then it's game over. In a weather app, if it is being looked at in the morning, show a sunrise graphic; show stars and a moon if it is nighttime. In this article we'll explore how conditional structures work in JavaScript.
-
Looping code
-
Sometimes you need a task done more than once in a row. For example, looking through a list of names. In programming, loops perform this job very well. Here we will look at loop structures in JavaScript.
-
Functions — reusable blocks of code
-
Another essential concept in coding is functions. Functions allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times. In this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define functions, scope, and parameters.
-
Build your own function
-
With most of the essential theory dealt with previously, this article provides a practical experience. Here you'll get some practice with building up your own custom function. Along the way, we'll also explain some further useful details of dealing with functions.
-
Function return values
-
The last essential concept you must know about a function is return values. Some functions don't return a significant value after completion, but others do. It's important to understand what their values are, how to make use of them in your code, and how to make your own custom functions return useful values. 
-
Introduction to events
-
Events are actions or occurrences that happen in the system you are programming, which the system tells you about so you can respond to them in some way if desired. For example if the user clicks a button on a webpage, you might want to respond to that action by displaying an information box. In this final article we will discuss some important concepts surrounding events, and look at how they work in browsers.
-
- -

Assessments

- -

The following assessment will test your understanding of the JavaScript basics covered in the guides above.

- -
-
Image gallery
-
Now that we've looked at the fundamental building blocks of JavaScript, we'll test your knowledge of loops, functions, conditionals and events by building a fairly common item you'll see on a lot of websites — a JavaScript-powered image gallery.
-
- -

See also

- -
-
Learn JavaScript
-
An excellent resource for aspiring web developers — Learn JavaScript in an interactive environment, with short lessons and interactive tests, guided by automated assessment. The first 40 lessons are free, and the complete course is available for a small one-time payment.
-
-- cgit v1.2.3-54-g00ecf