background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Уроки JavaScript | #10 - Функции"

input logo icon
Video tags
|

Video tags

jquery
css
javascript
HTML
HTML5
css3
видеоурок
уроки
developer
blog
unity
tutorial
web
development
как
создать
сайт
создание
сайта
wordpress
bootstrap
js
javascript tutorial
js tutorial
уроки javascript
уроки js
js уроки
javascript уроки
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:01
hello everyone, look they sound tough
00:00:07
today we will talk about functions but they are
00:00:09
sleeping subscribe our channel like
00:00:12
this video and write a comment
00:00:14
also subscribe to our
00:00:16
VKontakte group like write
00:00:19
comments participate in discussions
00:00:23
what let's talk often we need
00:00:27
to repeat the same action in
00:00:30
many parts of programs,
00:00:31
for example, it is beautiful to display messages when
00:00:34
greeting a visitor, as well as when a
00:00:37
site visitor exits, perhaps
00:00:40
in order not to repeat the same code; in
00:00:42
many places, examples of
00:00:52
built-in functions and kanfer have been invented,
00:00:57
and you can also create your own
00:01:00
declare a function, let's look at the
00:01:03
example of the
00:01:06
word noise noise the name for our function
00:01:12
here we indicate the parameters for our
00:01:15
function but you can also not specify it
00:01:17
and here we will display let's say the message 5
00:01:36
first comes the
00:01:38
legs of the evening better after it the name of the
00:01:42
function then a list of parameters in brackets
00:01:45
and the body of the function the code that is
00:01:51
executed when calling the function for
00:01:57
in order to call this function, we
00:01:59
need to write down
00:02:01
the name of our function,
00:02:13
this code will display a message twice,
00:02:18
as if here already and you can see the main goal of
00:02:22
creating functions is to
00:02:25
get rid of code duplication, if
00:02:29
you need to change messages or also
00:02:32
ways of displaying it, just change
00:02:34
it in one place of the function that it comes
00:02:37
out let's see hello everyone hello
00:02:43
everyone but these let's talk about local
00:02:47
variables and can keep
00:02:50
local variables declared and through
00:02:53
war such variables are visible only inside the
00:02:56
function that is, if we all here
00:03:01
declare the message variable and assign
00:03:06
values
00:03:10
hello this will be a local
00:03:27
variable no we see our message in
00:03:42
this way, a
00:03:46
new view, if you want to do it
00:03:51
like this and display
00:03:55
this message you will receive you will not
00:04:02
get anything fact error
00:04:09
it is important where exactly the function is how many times the
00:04:12
variable is any declaration is
00:04:14
triggered once and 1 percent
00:04:16
applies to the entire function
00:04:20
also let's talk about external variables
00:04:23
a function can access an external
00:04:25
variable for example if we create let's
00:04:37
call bold let's say alex
00:04:49
if we want
00:05:05
john and
00:05:12
carry out assign it external change
00:05:16
next
00:05:18
print hello let's say I and print our
00:05:36
grains then just print this
00:05:47
message
00:06:00
further mutually our function
00:06:15
as you can see hello I John, of course, if
00:06:21
inside the function,
00:06:26
yes, on the line, its own
00:06:28
local variable war was declared, all
00:06:31
calls would use it and external
00:06:34
changes would remain unchanged;
00:06:37
variables declared at the level of the entire
00:06:41
script are called global variables,
00:06:44
that is, it’s bolder that we
00:06:46
make a global variable and only
00:06:50
those variables that are global really
00:06:51
have a general meaning
00:06:53
for your project needed to solve a
00:06:56
specific problem let them be local
00:06:59
in the corresponding function I would also like to
00:07:06
talk about choosing a name for a function not a
00:07:11
function follows the same rules as a
00:07:13
variable name the main difference is it
00:07:16
must be a verb
00:07:17
that is, a function is an action the rule
00:07:21
is used here is a verbal prefix
00:07:23
denoting the general nature of the action,
00:07:25
followed by a clarification of the functions
00:07:28
that begin with show
00:07:30
something shows that you think, let's say
00:07:36
functions starting with get how
00:07:46
calculate glue create people I
00:07:53
check I think that in principle everything is simple
00:07:57
and it is very convenient since it is
00:08:00
shifted to the function of men approximately Let
00:08:02
's imagine what it does even if
00:08:04
the function was written by seven people, identified
00:08:07
cases and what type of value it
00:08:10
returns,
00:08:11
let's do it so that there is one
00:08:14
function,
00:08:15
one action, the function should
00:08:17
only do what its name clearly plays out
00:08:19
and this should be but is
00:08:22
if it is complex and imitates the action
00:08:25
maybe it makes sense to isolate their
00:08:27
separate functions, what does it make sense to
00:08:29
structure better under also,
00:08:33
let's talk about returning a value, a
00:08:35
function can return a result
00:08:38
that will be passed to the callers and the code,
00:08:42
for example, let's create a function that will
00:08:55
return the discriminant of a quadratic
00:08:56
equation squared minus 4 GHz
00:09:06
here is my why BMP and nose
00:09:17
40 with it a variable test which we will write down
00:09:31
the value 41 by translating our variable
00:09:44
test
00:09:50
we will get our those 20 hurry just to
00:09:57
return the value our directive is used
00:10:01
and it can be located
00:10:04
anywhere in the function only before it finds
00:10:06
control the function is completed and the
00:10:08
value is passed back to the call
00:10:12
because it can be, for example, several
00:10:16
region directives, it can also be
00:10:19
used without a designation to
00:10:20
stop execution and exit our
00:10:24
function, in principle, that's all I wanted to
00:10:28
tell everyone, thanks for watching, see
00:10:31
you again

Description:

Уроки JavaScript | #10 - Функции В этом уроке поговорим о создании функции и их причастности к Javascript. Разберем как они используются в последующих шагах в программе. Официальная группа Вконтакте: https://vk.com/developblog

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Уроки JavaScript | #10 - Функции" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Уроки JavaScript | #10 - Функции" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Уроки JavaScript | #10 - Функции" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Уроки JavaScript | #10 - Функции" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Уроки JavaScript | #10 - Функции"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Уроки JavaScript | #10 - Функции"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.