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

Download "JSE_V18 FD2-100-21 2021.09.04 A.00-A.47, N.03, N.05"

input logo icon
Video tags
|

Video tags

FrontEnd
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:02
took a course in layout and inside triggers
00:00:05
they get here to bypass the academy and
00:00:07
inside the course we have layout
00:00:09
dating java script so called
00:00:11
basic again all materials and steel
00:00:13
courses that were in the workbook they
00:00:16
actually included here is that they are
00:00:18
there will be here but we will stop at them
00:00:19
I won't be here for long, I'll run through
00:00:22
if anyone still has these materials
00:00:24
some questions and misunderstandings you just
00:00:26
whistle until stop stop, can I ask here?
00:00:29
and then I once again do something usually
00:00:31
basically I guess we just
00:00:33
let's go for a run and let's go further I will
00:00:35
tell only the tour what they studied
00:00:39
Well, I told you that on this course we
00:00:41
don't assume that we are on computers
00:00:43
we are doing something yes you are doing it at home on
00:00:46
layout course I can accurately enough
00:00:48
predict how long it will take you
00:00:50
performing some task here is
00:00:52
literally someone does something unpredictable
00:00:54
in 10 minutes someone does the whole week yes
00:00:57
that is, we cannot sit and wait until
00:00:59
someone will do it, so we endure it all
00:01:01
for homework at the end
00:01:04
course we will have an empty project here
00:01:08
could listed requirements you now
00:01:09
you probably still can’t understand
00:01:11
but I have to them that is you will do
00:01:13
web applications in which you show everything
00:01:16
what to teach all kinds of multimedia
00:01:18
touchscreen and all sorts of animations and so on
00:01:21
everything we have learned
00:01:23
So
00:01:24
here is a link to the criteria
00:01:27
the graduate will pass the assessments, that is, when I
00:01:30
I will evaluate the final project I will
00:01:33
look at the deck yourself when you go
00:01:34
how much you this criterion each
00:01:36
steam that is, as you showed
00:01:38
interactive features like you
00:01:39
show how you showed your skill
00:01:40
communicate on
00:01:42
version of the mountains in this case the verse for example
00:01:45
or anything else like you did
00:01:46
navigation in this single doctor children tires and
00:01:49
so on now this is most likely for you and
00:01:51
doesn't say anything so don't bother
00:01:53
pay attention to this when we are in some kind of
00:01:55
moment we're going through some topic I'll be there
00:01:57
come back here and talk now you
00:01:59
Do you understand how this criterion can be
00:02:01
just do it for now if necessary
00:02:03
look at me it doesn't look like you
00:02:06
be interesting, well, everyone has a graduation project
00:02:09
we're better off there at the very last
00:02:10
protect you will be here for sure and and
00:02:15
I probably don’t advise you in advance at all
00:02:20
worry about a narrow project I have
00:02:22
moment at 2 marked in my mine
00:02:25
cheat sheets at what point to tell you
00:02:27
guys it's time and I'm at this moment and there for you
00:02:30
see where for the rocket theme you can like
00:02:33
it’s like children’s where you can emphasize
00:02:34
status and then at least you will
00:02:36
ready to start making mine
00:02:38
project now better focus on
00:02:41
the material itself
00:02:42
do your homework about the project
00:02:44
better not to think at all
00:02:46
Well, actually, that’s probably all there is to it
00:02:49
this introductory part
00:02:52
let's now move on to the material
00:02:58
you look what I'm doing, I'm opening the most
00:03:01
first topic here and so in working
00:03:04
notebook is what is on the slides in different
00:03:06
tabs and
00:03:10
we start these little by little and so about
00:03:13
variables what is a jim variable
00:03:16
hide yes I assume everyone knows yes
00:03:18
that's what they are called as usual
00:03:23
they call it case sense yes all this
00:03:26
know that every word is capitalized
00:03:28
with a capital letter to us is somehow called
00:03:30
who remembers
00:03:32
channel created well done below what to know
00:03:35
and in our
00:03:38
in all modern browsers already
00:03:40
modern new version supported
00:03:42
java script which is called
00:03:44
ecmascript 6 7 8 from whom how let's
00:03:47
a little dulled because this one
00:03:49
there was no sun in the basic java script
00:03:51
java script was developed very very
00:03:53
for a long time there were some shaggy ones and so did I
00:03:55
I remember this 2 days after my wedding
00:03:57
on it on December 4
00:04:00
but for many years he did not
00:04:03
developed because he actually does not
00:04:07
there is no point in developing why java script
00:04:08
change if the browser is supported
00:04:11
out a browser was a complete shaggy century
00:04:15
new browsers were released every day
00:04:17
everyone fought each other
00:04:19
tried to be incompatible each other
00:04:20
other, that is, the marketing kula on
00:04:22
literally you know all the browsers
00:04:24
internet explorer yes ok about children's who
00:04:27
haven't heard
00:04:29
we are a little older people there is dirt more often
00:04:31
more likely he heard
00:04:34
so on the Internet I won this layer
00:04:35
That’s why there’s no way to straighten out the war
00:04:38
you don’t know anything, but once there were two
00:04:40
netscape browser on i would say there
00:04:42
it's probably better like this
00:04:45
it turned out that microsoft beat him
00:04:47
and then others appeared
00:04:49
advanced about the lake let's say more
00:04:51
reliably now you are an internet explorer
00:04:53
I live like this, you all think about him
00:04:55
I'm afraid you don't want to use it, but
00:04:57
one way or another when did these appear
00:04:59
the newest browsers are already up to date
00:05:02
they have a policy, something they call it
00:05:05
personally strong and that is, they automatically
00:05:07
are updated you know that chrome when
00:05:09
any reboot of firefox is not automatic
00:05:12
come forward and you always have one way or another
00:05:14
latest version of the browser and therefore if
00:05:17
suddenly chrome introduced some kind of support
00:05:19
something she very soon ends up with
00:05:22
Firefox does the same for everyone and that's why
00:05:26
it turned out that it already makes sense to develop
00:05:28
version of the language, that is, new ones are coming out
00:05:30
language standards after some time in
00:05:32
browsers are starting to support these
00:05:34
opportunities after a while this
00:05:37
support is already showing carcasses around
00:05:39
layers of the population and then already
00:05:41
developers can write a program with
00:05:43
using these new opportunities
00:05:45
that is, this was this breakthrough
00:05:46
literally a few there five years ago
00:05:49
maybe that's when it appeared
00:05:52
this one like this with a mask 6
00:05:54
which is like it's something else
00:05:56
name of the person ecmascript 6 either
00:05:58
ecmascript 2015 is the same version
00:06:01
language after that it is even further
00:06:03
developed now there 8 maybe 9
00:06:05
it's convenient to say it's not that important
00:06:08
but the main thing is that along with this there is racing
00:06:10
Moscow 6 many new interesting things arrived
00:06:12
capabilities that were not previously available in the language
00:06:15
enough one of them is variables
00:06:17
which are announced not through cooking through
00:06:19
years so who knows about the project years
00:06:22
few yes, so you have to manage and
00:06:25
so when we would and you announce
00:06:26
variable via war remember it
00:06:29
inside the function and when the function
00:06:31
ended variable stops
00:06:33
act trace the same but you yo
00:06:36
you can declare inside for example a loop
00:06:38
they will be years old when the cycle ends
00:06:41
No I see, yes, or for example, inside IFA you
00:06:45
announced and inside the curly columns
00:06:47
were variable through the years when them
00:06:49
this variable is over
00:06:51
she has time to live nothing area
00:06:53
apparently this idea is not clear to me
00:06:58
can be very important, we will also have
00:07:00
Of course I'll tell you a lot of examples
00:07:02
I’ll show you on this topic and you can eat
00:07:05
declare variables or already accelerations
00:07:07
variables and constants in the word konce tv
00:07:09
but this is the same variable as
00:07:11
years, but you can’t change its value
00:07:14
is possible to declare immediately assign it to it
00:07:16
the value can then be changed
00:07:18
it is forbidden
00:07:19
so they are called differently, mind you
00:07:23
with capital letters and underlining
00:07:24
between words, does anyone know how
00:07:27
called
00:07:28
sleep or snake case
00:07:31
saw a snake
00:07:34
that's why it's good here and I also have to
00:07:38
say tell about strict regime
00:07:40
has not yet been mentioned here
00:07:42
us in
00:07:45
let's say the standard old crypt
00:07:47
there is actually one big problem
00:07:49
there are many so-called generic
00:07:51
injuries and because it was invented
00:07:52
very quickly in just a few days
00:07:54
the language standard was compiled simply from
00:07:56
different ideas from other languages
00:07:58
no one expected that such a thing would be needed
00:08:01
the great popularity of this language
00:08:03
will be used on there billions
00:08:04
devices and therefore do not particularly work on it
00:08:06
I think there are significant to the network one of
00:08:09
the biggest language you probably know that
00:08:12
if any
00:08:15
you write like this and is equal to 5 without
00:08:19
words what is happening who knows the world she
00:08:23
global, that is, in this way
00:08:26
global variable
00:08:27
you know, yes, it’s an ambush, although that is, it’s like
00:08:30
would be a function inside but on us but in reality
00:08:32
global because of this there can be a lot
00:08:34
shoals will not grow and will not grow
00:08:37
grow up that's why because it's
00:08:40
weird behavior they did this
00:08:42
opportunity at the beginning of the program we can
00:08:45
write this phrase in the dots yes
00:08:47
strict that is, use strict
00:08:49
this is the regime from now on
00:08:51
the behavior simply causes an error i.e.
00:08:54
the truth will simply refuse to do this
00:08:56
the function will have an error in the console and that's it
00:08:58
yes, we defended ourselves this way, but
00:09:00
this is why this is not correct and not
00:09:01
good behavior fingers still prohibits
00:09:04
a couple of other unpleasant scenarios and
00:09:06
this is the most important of them
00:09:09
why do you think it's in quotes
00:09:13
why couldn’t it be simple and strict
00:09:20
no start what an interesting thing
00:09:22
java script should be anyway
00:09:24
combined somehow with the old ones
00:09:26
browsers, imagine for example that
00:09:30
imagine doing this
00:09:33
language extension what you can write here
00:09:36
just write the program like this at the beginning
00:09:38
plus 3 all new browsers understand this
00:09:41
let's say chrome firefox and so on
00:09:44
it will be in the old browser, just in case
00:09:46
someone will discover in the old konig that
00:09:48
will happen in
00:09:51
browser that I don’t know what it is
00:09:53
chandelier
00:09:54
mistake and we live here mistake correctly
00:09:57
the entire script will break and will not work
00:09:59
what will happen and what will happen if we decide
00:10:03
what is she in quotes to write down what with
00:10:05
from the point of view of the old browser this means
00:10:06
state
00:10:09
yeah, well, that is, let me explain a little
00:10:11
now if we write like this wore a equals 2
00:10:15
plus 5 what does he do, caresses
00:10:17
adds 2 plus 5 remember counts
00:10:20
expression and assigns the value to that
00:10:23
variable expressions from correct
00:10:25
right now what if you just
00:10:27
let's write plus 5 so you can write
00:10:31
Is it possible to do a java script?
00:10:34
will calculate the value of the expression that
00:10:37
it will work out just because of this
00:10:40
I thought I was strong and you didn't move on
00:10:42
They said that nothing should be done with these 7
00:10:45
will make it clear but respected and
00:10:47
it will get lost, what if you just write 5
00:10:51
.
00:10:52
What
00:10:54
he will calculate the value of this
00:10:56
expressions it is equal to letters not just
00:10:58
I’ll move on, it’s clear and accordingly
00:11:01
what does he do in this case
00:11:03
he considers the meaning of this expression
00:11:06
this line doesn't do anything at all
00:11:09
what next? that is, just the old browse
00:11:11
ignore this line it will count
00:11:13
I'm not afraid of her
00:11:15
I have you go further than the head browser
00:11:17
knows that this is a switch, abstract
00:11:20
that is, the idea is clear they are this way
00:11:23
made the violin compatible from the old ones
00:11:25
with new pro services they are always like this
00:11:28
trying to do nothing to spoil how
00:11:31
I didn’t tell you about the hawk, I advise you
00:11:33
all your program now start sims
00:11:36
3 to always write we start north like this
00:11:40
and proved cost I already told you
00:11:46
now about simple data types
00:11:51
what the hell if a tank
00:11:56
means number string logical value
00:11:58
true true Poland everyone knows that, that is
00:12:02
well, but in reality it’s like that and then you know
00:12:04
this is not a separate type there is
00:12:06
the concept of an object is just empty
00:12:08
object is a value of the type rest itself
00:12:11
in fact there are hands for example anda will understand everything
00:12:13
they know about breathing, it’s always separate
00:12:16
there is a symbol, we won’t pass it
00:12:19
if you want to delay part I am the highest
00:12:21
moment the link is just in
00:12:23
modern browsers supported
00:12:24
something there might be very useful
00:12:26
there is more I won’t go into the main thing
00:12:28
we'll take these off for us anyway
00:12:31
most of all we will work on how
00:12:34
numeric strings are written
00:12:36
everyone knows the constants, this is it
00:12:38
about these surveillances
00:12:42
yes everyone knows how it works well
00:12:47
what else are the lines templates here?
00:12:51
this is something that was not there during the basic course
00:12:55
Joe Moscow
00:12:56
or on standard ones on creaking 6 brought to us
00:13:00
very important feature of the line which
00:13:03
backquotes are used, notice the slash
00:13:06
slash o quote back stroke
00:13:09
this is their so-called template string
00:13:11
there are several features 1 you are
00:13:14
you can break the line into several
00:13:15
lines of source code because I'm here
00:13:17
wrote to that is, I could press enter and
00:13:20
everything turns out that in reality this is
00:13:23
this place
00:13:25
in the line itself, line feed is everything
00:13:29
the same as I would write line 1 slash and
00:13:32
space space line 2 that is, this is it
00:13:35
line feed and in before two spaces
00:13:36
they are all inside the page this way
00:13:39
it's much easier to write string things
00:13:41
especially if someone has already tried
00:13:43
for example, work with all sorts of Jason them
00:13:45
xml amide in java script then you understand
00:13:47
that often we have multiline
00:13:49
template to fill out icon
00:13:51
just like this and very easy
00:13:53
take you take a ready-made template for
00:13:55
backticks all the right places
00:13:57
put
00:13:59
extremely useful thing
00:14:01
so in these lines of templates you can
00:14:04
use a so-called placeholder
00:14:07
that is, we bet dollar and curly
00:14:10
parentheses in curly braces can be
00:14:12
write down any expression she won't
00:14:14
here it is simply inserted inside the line then
00:14:17
there is a matrix I was a row oao was
00:14:19
the value 5 is what I put in the variable c
00:14:22
I put a pattern line in which
00:14:26
first comes the words text here she is and then
00:14:29
the value of the variable t is substituted here
00:14:32
she will then pour out all the words and then
00:14:36
the value of the expression plus 1 that is
00:14:38
six saw how everything was laid out then
00:14:41
there is if he would give me a few things
00:14:42
I would have to close the quotes all the time
00:14:45
plus then open the quotes again
00:14:47
this is all very pleasantly mastered
00:14:50
then again this one is very very
00:14:52
a handy thing, actually a lot
00:14:56
it is the template strings that have others
00:14:58
I won’t go into depth about the new chips
00:15:00
because they are rarely used
00:15:02
you can be powerful if you want separately
00:15:04
read
00:15:05
I would probably be here
00:15:07
this phrase remains from some old
00:15:10
times I suppose that to start some
00:15:12
version should already work by the way
00:15:14
let's check where we check
00:15:18
on tits on food
00:15:21
the most correct condition and let's
00:15:24
let's try to guess how they are how they are
00:15:26
they work as they are called
00:15:40
surprise of love and I don’t know how they are
00:15:44
in English it is called instead of therefore as
00:15:45
find it but I'll check support if
00:15:48
what needs to be fixed here
00:15:53
because you know that now it's already
00:15:55
internet explorer he is quietly
00:15:57
reborn into
00:15:59
perhaps this phrase is really for
00:16:01
all versions of internet explorer and
00:16:03
correct data I want to forward it
00:16:05
him because he could have made a mistake here and there
00:16:08
one subtlety about how the lines
00:16:10
presented inside the park
00:16:12
yes they will
00:16:14
exactly
00:16:25
just about template liters
00:16:28
followed by string literals this is what it was
00:16:30
and before, let it be in quotes there and so
00:16:32
Further
00:16:35
Well, yes
00:16:40
even at 5
00:16:42
with questions even those support
00:16:43
unknown, that is probably this phrase
00:16:47
let's leave it as is
00:16:49
so I wanted to say now about
00:16:52
internal string representations you
00:16:54
You've probably heard the concept of encoding
00:16:56
remember the character encoding who is which
00:17:00
you know the encodings
00:17:01
yes, besides utf-8, someone knows something
00:17:07
yes and
00:17:09
8r maybe someone heard but here
00:17:12
tax encodings on the course in layout in
00:17:14
including us, this is us, but this is a little bit
00:17:15
talked about
00:17:19
what what is important here when you work
00:17:22
in other languages ​​someone was messing around
00:17:23
for example there and so on concept
00:17:25
encodings for you basically represents
00:17:27
yourself and have some meaning to you
00:17:30
sometimes you have to tinker with data
00:17:31
which came in some kind of encoding before
00:17:34
you need to recode this into something
00:17:36
always a whole java script problem to do
00:17:38
this is completely isolated and because
00:17:40
java script is always under the hood
00:17:43
processes data in the format
00:17:45
utf-16 16 that is all lines
00:17:50
each character is represented
00:17:51
with two fingers it allows you to work
00:17:53
according to almost any symbols
00:17:56
which exists in the world at the same time
00:17:58
fast enough utf-8 is just bad
00:18:01
to work inside the language
00:18:02
programming because it is unknown
00:18:04
how many bytes does each character take?
00:18:07
you probably know what f8 is
00:18:08
an English letter takes up one byte
00:18:10
Russian two bytes hieroglyph four
00:18:13
finger and so on, that is, for example if
00:18:15
you said I want from some line 100
00:18:18
characters and where is it there 100 it will have to
00:18:21
count one each time
00:18:23
analyzing Russian summer English years and
00:18:25
how much tobacco to pass until we get there
00:18:27
up to 100 force if you know for sure that in
00:18:30
Each character contains exactly two bytes, then 100
00:18:32
characters in the 200th byte is correct
00:18:35
is it allows you to work something is
00:18:37
java script decided that
00:18:39
internal encoding is utf-8 so any
00:18:43
almost a symbol can be represented by a string
00:18:44
work quickly and any data that
00:18:47
one way or another the outside come anyway
00:18:49
otherwise when is encoded and represented in
00:18:51
this is the top 16, that is, you are from
00:18:53
Encoding problems are completely isolated
00:18:55
this is a great blessing but the thing is that
00:18:58
this f-16 is not really any symbol
00:19:00
one can imagine
00:19:01
there are characters that we don’t fit in
00:19:04
into this encoding and accordingly they are on
00:19:06
java script level at a little bit of Tomsk
00:19:09
I love Sika for example they really are
00:19:11
were occupied by two characters of some kind
00:19:14
in a sense, no, well, in short
00:19:16
something strange is starting to happen every time
00:19:18
very rare somehow
00:19:20
mental and rubles or something but just
00:19:23
know that braids can be
00:19:26
that's good let's move on now
00:19:30
simple topic, all sorts of arithmetic
00:19:33
addition and subtraction operations
00:19:35
departments modulo unary binary
00:19:38
everyone knows this
00:19:41
ok don't forget if you can
00:19:43
ask how the slings are glued together too
00:19:46
everyone knows a plus sign
00:19:47
good about the fact that you can use parentheses
00:19:50
use
00:19:52
to manage priority there
00:19:55
everyone knew the addition of their operations too
00:19:59
so small now
00:20:02
accuracy warning
00:20:09
that is, for example, we can write you
00:20:12
you know what if there is something to write down
00:20:14
expression it is immediately calculated yes
00:20:17
Well, you see what an interesting miracle 0 2 + 0
00:20:20
and 1 why that one in blue 03 and a little
00:20:23
other meaning is similar see 0 2
00:20:26
minus sailors will not respect and but 0 3
00:20:29
minus 0 1 already
00:20:32
that is, the value is inaccurate, it is not
00:20:36
some kind of java script jamb it will be like this in
00:20:38
any programming language java script
00:20:40
he can't count fractions himself
00:20:42
this is all literally done on
00:20:45
processor level, that is, for all languages
00:20:48
there will only be a recipe for puff pastry, such a joint
00:20:50
unless they have some kind of their own
00:20:52
support for floating point operations
00:20:55
for example, some scientific programs and
00:20:57
so on they can have their own
00:20:59
implementation more accurate from 8 to 16
00:21:02
there are not enough decimal places
00:21:03
calculate much more and according to others
00:21:05
algorithm is more accurate, that is, it does not
00:21:07
speed is important, accuracy is important
00:21:10
new any normal languages ​​and
00:21:11
you get this jamb and usually again
00:21:14
this jamb doesn’t bother you because
00:21:16
this meaning is used and not
00:21:18
show you for example why 1 3
00:21:21
optimal rating because you
00:21:23
there were 03 rubles and you took 0 1 from it
00:21:25
ruble, that is, the result will also be 0 2
00:21:27
ruble and the benefits you show
00:21:29
user you will round to two
00:21:32
decimal places
00:21:34
well, even if you need two signs again
00:21:37
decimal places when you buy here
00:21:39
this value is up to 5 digits after you
00:21:41
get 02000
00:21:44
you understand that there is a jamb only in
00:21:46
sixteenth decimal places
00:21:48
considering what you always show
00:21:51
data rounded by not sixteen
00:21:53
signs and less you usually have this
00:21:56
the problem does not concern but in principle too
00:21:58
remember that the calculations are not exact and
00:22:01
in some cases this is small
00:22:02
error 16 signs it starts
00:22:04
accumulate for example if you have a cycle
00:22:06
or is the construction still something and here it is
00:22:09
this is a mistake, it's jumping closer and closer
00:22:11
and sooner or later maybe a whole part
00:22:13
launch the featherbeds
00:22:17
you can't count any language absolutely
00:22:19
exactly the same now about the string expression
00:22:22
I already asked you so you know what
00:22:25
the lines stick together and so and now I want
00:22:28
ask
00:22:29
we can remember about those operations
00:22:32
apply some operations simultaneously
00:22:34
for example, to the line a number, that is, put
00:22:36
some kind of operation sign between the line
00:22:38
number to remember this jamb for example that I
00:22:42
I can write 2 minus 1 and it turns out
00:22:47
number 1 because how does it turn out who
00:22:51
can explain
00:22:54
to an integer in a numeric but why exactly
00:22:58
numeric kill already has a string and a number
00:23:01
because only numbers have a minus
00:23:04
there are operations minus there are only between
00:23:06
numbers so it’s clear what exactly is needed
00:23:09
2 strictly 2 bring to garlic 2 before and
00:23:12
after that you read the same thing
00:23:15
for example, with multiplication it’s all fine
00:23:16
will work but it won't work
00:23:19
addition
00:23:20
because there is a plus for both numbers and
00:23:24
strictly so for some reason they decided what it means
00:23:27
plus will result in the line me
00:23:30
it seems like it's just for the sake of it
00:23:31
it's easy to write down all sorts of things like there's no
00:23:34
I know there's allure there's a sum
00:23:39
no one knows if they were like this
00:23:42
if you in case added plus led
00:23:45
there is no number and there is no number
00:23:48
write
00:23:49
very convenient for convenient input/output
00:23:53
smaller that will still be a plus
00:23:55
list the names on the line, although it’s quite
00:23:58
it’s better to use it for any operation
00:24:01
gluing and then stuffing it to know for example
00:24:03
in other languages ​​there is for example . . This
00:24:06
merging strings and plus is always addition
00:24:09
It would be better if they came up with another sign, but they
00:24:11
decided to take a plus from it from me to him
00:24:15
such an unpleasant joke about which
00:24:17
you need to remember but other operations that is
00:24:21
results in a string of both operands only
00:24:23
plus other operations results in a number
00:24:26
even if they are valid for string number
00:24:28
so that is, for example, where it is possible
00:24:31
see
00:24:33
look if I compare for example
00:24:36
20 is less than 5 why it turns out to be a friend
00:24:47
these are strings and do not compare as strings
00:24:49
the first character is inserted by you five more
00:24:52
everything is clear, but it doesn’t come to zero
00:24:56
but that's not the case anymore
00:24:59
that is, since the operation is smaller it
00:25:02
valid for strings and numbers here
00:25:05
jalas someone needs to choose him what we
00:25:07
we will convert the string to
00:25:08
number or number to line number to line
00:25:11
only for plus and for all others
00:25:13
cases the lines number on so it is 20
00:25:17
convert to quality and compare with 5
00:25:19
it turns out it’s not at all clear how in this
00:25:23
moment some steel you're leaving
00:25:25
you're still holding on should start at
00:25:28
There is such a picture on the Internet
00:25:29
will fit the passage to the girl g8
00:25:32
you can find these
00:25:35
she tried something like this
00:25:37
study changed my mind study compassionate so
00:25:41
and another one with these same things
00:25:44
subtlety see ours including
00:25:48
operation is also the same thing to do
00:25:50
look at our 5 equals 30
00:25:54
here because the number 5 3 barroso line
00:25:57
5 is converted into the number 5 and then they
00:26:00
look at this now
00:26:02
something interesting should be done like this
00:26:04
write yes, that is, an empty line
00:26:07
remember it is converted according to the algorithm
00:26:09
number if anyone has studied qs basic
00:26:11
discounts paid attention when garlic
00:26:14
are converted to a number automatically
00:26:16
I'm glad there are several options for parks
00:26:18
in the force here is one of them set then
00:26:20
there is how it works exactly on amperes from
00:26:23
walt strings empty string converts
00:26:25
forged but not only empty noticed that
00:26:28
the space is also quite the result and
00:26:30
for example slash slash in any of these
00:26:34
whitespace characters so-called
00:26:35
remember this term is that is only
00:26:38
line feed carriage return
00:26:39
vertical adjustment tab
00:26:42
horizontal is all the so-called
00:26:44
penetrating force even if the line
00:26:46
completely that this is stable today
00:26:47
it is not empty at all, as you can see a long time ago
00:26:50
something is, but in fact all the symbols
00:26:52
there are spaces in it, there is such a term
00:26:55
accordingly, ropes are formed
00:26:56
Kamenyuku and accordingly it turns out that
00:26:59
equality is true do hold on for now
00:27:02
boring grief
00:27:04
since comparison operations work with us
00:27:08
you now have a little bit of just that
00:27:09
touched less more it's all of you
00:27:11
look at how strings are compared and with what
00:27:15
the difference between triple and double is equal
00:27:18
they know
00:27:19
there is a quadruple
00:27:22
May be
00:27:24
ok, nothing to hide, it’s still developing
00:27:28
so good now about the transformation
00:27:31
data types this topic is on passenger those
00:27:33
we have but I'm here a little let's go
00:27:37
na developed yes but well here she is a little
00:27:41
in more detail then let's at least
00:27:42
Let's repeat briefly and so on in this topic we
00:27:46
We will now study how data in general
00:27:49
different types are converted to data from others
00:27:51
what kind, how and by what algorithm
00:27:54
this is happening now we are talking about exactly
00:27:56
explore how strings are converted
00:27:58
is converted into the number of what there are at all
00:28:00
option that is, let's say if we have
00:28:02
a string and we want to get a number from it
00:28:04
which is not written down what options are there
00:28:07
obvious to everyone probably known by
00:28:09
remember the difference between passwords
00:28:13
marshall allows fractional numbers i.e.
00:28:16
the string entry may contain decimal
00:28:19
point minus 38 gives the number -3, that's dangerous
00:28:23
from -38 only -3 will be enough because .
00:28:26
this no longer allowed everything to be read on
00:28:29
skip if you give parsing either
00:28:31
password any is unacceptable and significance
00:28:34
already the very first character is not there is not a number
00:28:37
then the answer will be to us what is everything to us
00:28:40
to whom
00:28:41
good and there is a separate option number
00:28:45
that is, you can write to us and
00:28:47
pass him some string and she too
00:28:49
converted to a number but a little bit
00:28:51
to another, that is, from minus 38 this is the number
00:28:54
minus 38 but from 22 g we immediately get it because
00:28:58
what is unacceptable here for the number 7
00:29:02
that is, they can parse farkhod with them
00:29:05
work here's how parsing works
00:29:08
he took a deuce and then [ __ ] him with ours
00:29:11
no longer an acceptable number, it all means he's on
00:29:14
two and stopped the answer will be two then
00:29:16
there it converts the string to a number up to 1
00:29:19
invalid character as soon as
00:29:21
met unacceptably strong everything
00:29:23
transformation completed she amber if
00:29:25
encounters at least one invalid character
00:29:27
all at once in response
00:29:29
so he makes 0 from an empty line like me
00:29:33
already today he speaks and mind you even in his sleep
00:29:35
mine does the same
00:29:38
if you suddenly tell him what’s here
00:29:40
that's all clear, okay now
00:29:43
let's be a little more cunning like we already are
00:29:47
today in fact look looked at
00:29:50
option you can try to apply to
00:29:52
string string variable any
00:29:55
an operation that is only allowed for
00:29:57
numbers for an example of multiplication, see
00:29:59
there were twenty-five me and three me in the line
00:30:01
Elena multiplied 1 since multiplication
00:30:05
only work for numbers java script
00:30:07
forced to translate this into a number and
00:30:09
multiply by 1 and get the number 25 to
00:30:14
This is a slightly more compact way than
00:30:17
write number but this is so hacker
00:30:19
both said and when you write a program
00:30:23
in general what should you optimize for?
00:30:27
what should we strive for?
00:30:29
the main thing is your rights
00:30:31
readability excellent summit same answer
00:30:34
what is less less code water old year
00:30:38
no, I want you to unlearn
00:30:39
forget Nika doesn't care how much
00:30:42
the code you dream about may be written
00:30:44
stock code has a mind if a person
00:30:45
I looked and understood everything, so that’s it
00:30:48
cool cool photo so clear year
00:30:51
and it’s hardest to write clearly about this
00:30:55
strive exactly vodka try this
00:30:56
yourself tabs visa while you and what
00:31:00
developing growing students
00:31:02
programmers, you will be tempted to write
00:31:05
as difficult as possible once you've learned
00:31:07
some trick some opportunity you
00:31:09
right now you want to write exactly like that because
00:31:11
that this is very unclear no one
00:31:13
understand and you already understand but this
00:31:15
should growth problem keep track of this in
00:31:18
yourself and try as soon as possible
00:31:19
translate try to write simply
00:31:22
it’s not clear to write something like this
00:31:24
although it is short and works just as quickly
00:31:27
as it should, but why should I?
00:31:30
I don't like it, whatever you want
00:31:33
divide by 1 you can subtract 0
00:31:36
This is the result of seed one, also 25 a
00:31:39
you can use the unary operation
00:31:43
unary what is unary minus everything with
00:31:46
us us variable was the 5th and taste and
00:31:49
deduced minus this variable turned out
00:31:51
minus 5a is in total if unary
00:31:54
minus changes the sign of the operand then unary
00:31:57
plus what does
00:32:00
unary plus does not change the sign of the operator
00:32:03
Why is it needed at all? It’s not clear, but
00:32:05
he just does nothing but because he
00:32:07
only works for numbers
00:32:10
very interesting way
00:32:11
converting a string to a number yes here it is
00:32:15
to be honest I like it because he
00:32:17
extremely compact and there you go
00:32:21
some speaker more or less communication
00:32:23
that is, this is often done by people who
00:32:25
they want to write faster, they often do it like this
00:32:28
once and for all notice that if if with this
00:32:32
the number swear will do nothing if the weight
00:32:35
this line you will get a number, well, sort of
00:32:38
ok interesting technique
00:32:41
but if I for example try to add with
00:32:44
zero then you see the transformation is not
00:32:45
it turns out I get the result
00:32:47
because it's a plus for the slings
00:32:50
between what number of guests
00:32:53
Well, these methods are clear, but nothing
00:32:58
there is probably nothing particularly new for you
00:33:00
was now how can we check
00:33:01
conversion result
00:33:03
note that in some cases after
00:33:05
converting string to number we
00:33:07
we get and we need to check a and
00:33:09
did we succeed, that is, if we succeeded
00:33:11
will appoint, for example, a person to drive
00:33:13
age, this is the right figure
00:33:16
so you need to try to check them
00:33:18
long archive here's how it's correct
00:33:21
do something that just compares with on
00:33:23
we won't get a protective result
00:33:25
now I will show you that I was 55 weight and
00:33:28
I transformed him through the fleet into
00:33:34
number that is, sleeps like you number
00:33:36
the value in it is 55th using the function and
00:33:40
I knew they were checking and we weren’t sleeping in this one or
00:33:44
no she's in front of no then I need normal
00:33:47
the number there is 55 to a
00:33:50
now look I take psst from and
00:33:53
I transform society and it turns out
00:33:56
pregnant woman sleeps I understand everything
00:33:59
why before
00:34:01
[music]
00:34:07
this one is nothing at all
00:34:11
like this now look why not
00:34:14
get equality don't look I
00:34:15
I'm trying to check for equality sleeping and
00:34:19
we don't and
00:34:21
triple equals also no, that is
00:34:24
the speed variable exactly lies on but
00:34:27
comparison operations won't work for us
00:34:31
special meaning
00:34:32
special numeric value she
00:34:34
so special that she even
00:34:36
not equal to oneself
00:34:38
it’s clear that this is usually the case at this moment
00:34:41
sides
00:34:44
you see, I tried to call it but
00:34:48
still not exactly to here but from
00:34:51
using the function and knew I could check
00:34:53
you see it turns out to be hard work I heard
00:34:55
says yes indeed in the variable
00:34:56
sleeping lying on well, that is, this
00:34:58
a reliable way to check and lies them
00:35:01
variable sleeps in such a clear language
00:35:03
like this, check a and accordingly
00:35:07
this is the variable and she knew
00:35:09
expects what type of argument
00:35:15
note the number
00:35:17
because in this case we are a variable
00:35:20
functions and knew passed the number to
00:35:22
variable sleeps lies the number to us it
00:35:26
numeric constant, that is, numeric
00:35:29
the variable can contain the numbers 57
00:35:32
and may contain special numeric numbers
00:35:34
constants
00:35:35
plus infinity minus infinity
00:35:37
plus 0 minus you are all numbers
00:35:40
constants
00:35:41
special numbers special feelings and java
00:35:43
script can work with them, it can
00:35:46
for example add infinities
00:35:47
infinity what happens if you add it to
00:35:49
infinity infinity
00:35:51
correct, what if infinity is divided
00:35:53
on indefinitely so there won't be
00:35:56
uncertainty has such meaning too
00:35:58
I think it just works out for us
00:36:00
simply che but one way or another there is
00:36:02
rules for working with infinity not with
00:36:04
these are a plus but you also need to cook so on
00:36:06
from us they are all sewn up in this
00:36:09
processor in its processing of any
00:36:11
numerical operations
00:36:15
that is, he knew exactly the number was expected if
00:36:20
we give y the number he says is
00:36:23
whether this number is a constant for us or not
00:36:25
is but if we give the line inside out
00:36:29
it first converts it to number a
00:36:32
then he says whether we succeeded or not
00:36:35
that is, 55 is easy to convert to a number
00:36:38
the correct number was 55 so
00:36:40
answer minced meat and 55 m when converted to
00:36:44
number of bits for us
00:36:45
so the answer here is clear how it worked
00:36:50
Now I didn’t know this function but we
00:36:54
has been working for centuries but already enough
00:36:57
For a long time there has been such a thing in the mountains. Not
00:36:59
I knew it worked a little reliable
00:37:02
understand a little she always expects that
00:37:05
this argument is exactly the number if you
00:37:08
pass strictly as an argument
00:37:10
she won't even check
00:37:12
it will work min it won't work out everything
00:37:14
red numbers means the answer will be immediately
00:37:16
falsehood, in many cases it is convenient
00:37:19
that is, look, here I am again, the same thing
00:37:21
got variables sleeping he's very on me
00:37:23
asked to check this function in English
00:37:26
then she says yes but when I do this
00:37:29
functions are passed strictly 55 she immediately
00:37:32
minced meat is burning, she doesn't try this much
00:37:34
convert to number this first
00:37:36
faster in the second more reliable in most
00:37:38
cases we need exactly this we will win
00:37:41
that's why we recommend this polarity
00:37:44
use and there is another function from
00:37:46
she sits and checks not on us but on
00:37:49
basically checks it turned out ok
00:37:50
cleaning or some special thing
00:37:53
there is, for example, something that can be special
00:37:55
by number it can divide infinity 5
00:37:58
zero will be infinity
00:38:00
accordingly she says these from them
00:38:02
no normal number minus
00:38:05
infinity is an abnormal number, but 7
00:38:07
normal number
00:38:08
a7 string is again converted to
00:38:12
the number turns out to be 7 and she speaks
00:38:14
small
00:38:16
I'll get a7m, they give it to us, but it's not
00:38:20
a normal feeling, that is, sometimes there is
00:38:22
it makes sense to check, it happens that in
00:38:24
as a result of some calculations may
00:38:26
you will get such specific things
00:38:27
like caldari infinity this one
00:38:29
the function can be easily checked
00:38:32
turned out to be a normal number or
00:38:33
some kind of infinity
00:38:36
and so look we transformed
00:38:38
now the lines into the number and showed that
00:38:41
it turned out now from the number strictly this
00:38:45
it's easier here everything is easy again
00:38:48
string option note that these are
00:38:50
options will be everywhere the type name
00:38:52
string number boolean and then in parentheses
00:38:55
some meaning like that in many languages
00:38:57
done when forming a data type
00:39:00
gave out different types, that is, this one here
00:39:02
thing it converts this number to
00:39:04
line here I had a number - 38 I
00:39:06
converted strictly got fear from us
00:39:08
38 the easiest direct descent and then
00:39:12
any data type has a special
00:39:15
method is probably a word many people know
00:39:17
and suga
00:39:19
. string has a number, that is, a string has a number
00:39:24
Many have a logical meaning. that
00:39:27
string and when you describe your
00:39:29
objects, garbage cars, what other things are there?
00:39:31
something you can ask how it works
00:39:33
this method is like your machine
00:39:35
converted to a string as it looks like
00:39:38
world if you output you have an object
00:39:41
class machine and fish you enter into
00:39:43
console what should appear from the console
00:39:45
So you just defined this method and
00:39:48
say my typewriter when it comes out
00:39:50
the console should look like this
00:39:52
for example car number and brackets
00:39:54
owner we ask ourselves how she is
00:39:57
looks like a string accordingly here
00:39:59
my number is 38 and I said I want to
00:40:02
the console of his converted strictly Ivan
00:40:05
I will get the text representation strictly
00:40:07
-38
00:40:09
then again you can glue it with
00:40:12
empty line remember how plus works
00:40:14
accordingly, we have minus 38
00:40:16
they glued it with an empty line
00:40:18
I got line -38 this method is often
00:40:22
applies again because
00:40:24
compact and
00:40:25
the usual one we have too
00:40:29
I see more and more people doing this
00:40:32
I don't know how to use the pattern string
00:40:34
I like it I think it's a lot
00:40:36
I have already decided to show what was written down so that
00:40:38
I would also like to introduce you to these and so many
00:40:40
we have studied the template accordingly
00:40:42
look what I got
00:40:44
the variable in it was -38 but in the console
00:40:47
derived a strict template in which
00:40:49
the value of the variable m is substituted
00:40:51
Naturally it turns out spartan
00:40:54
that's a lot
00:40:56
it’s written there in a complicated way, that’s why it’s not
00:40:59
I like it, everything is clear here too
00:41:02
lackey and now how do we convert
00:41:05
biological logical type I remind you
00:41:08
we have a corpse in Poland up to 2 meanings again
00:41:11
you already know option any value
00:41:13
we take boolean from it, that is, and
00:41:16
type name and brackets
00:41:18
these are the numerical values
00:41:21
that is, empty substance
00:41:27
[music]
00:41:33
[music]
00:41:36
only this is an empty number this is empty
00:41:40
line and the breath of the gift is special
00:41:42
the value is again empty, well they let it in
00:41:44
object and this is a special one above
00:41:47
which, as it were, is not a number, these are 5
00:41:50
they have meanings in this way
00:41:52
transform in Poland everything
00:41:54
the remaining values ​​will be given if in the line
00:41:57
she deserves one space
00:42:00
for example here is a boolean from 9 goals and
00:42:06
hacker's way to double negative
00:42:09
if we haven't stopped now
00:42:11
remember we have logical
00:42:13
operations logical and logical or a
00:42:17
to say this is not logical
00:42:20
there is a denial that is if he has
00:42:22
operand corpse then deny it
00:42:26
will reject and give falsehood and vice versa, that’s all
00:42:30
understand accordingly if we write
00:42:33
two ! it turns out that with this value
00:42:35
nothing will change, it will change twice
00:42:38
is denied and the result is the same as the gulag
00:42:40
But ! this is the only logical
00:42:44
operations sense she only has it
00:42:46
for boolean values ​​therefore having met
00:42:49
! java script will be forced with
00:42:52
convert boolean value here
00:42:54
this way and then again
00:42:59
turn it over and in the end after this
00:43:00
the device brought us together
00:43:03
converted to boolean
00:43:04
a little hackish but compact yes
00:43:07
that's why I use it often
00:43:10
Well, that’s also clear, so let’s go now
00:43:13
from numeric to logical
00:43:16
so I wrote it wrong here
00:43:19
here we are on the contrary on the environmental
00:43:21
numerical
00:43:24
we have a mistake
00:43:31
in the workbook completed completely in
00:43:33
header voltage and I in the web version I
00:43:36
I'll correct myself, that is, we have a logical
00:43:39
value and we need to get
00:43:41
the corresponding number is when you
00:43:44
apply a set to a boolean value
00:43:47
you get 1
00:43:50
that is, the finger is up to 0 labor and st-1 actually
00:43:54
actually a useful thing when you erase
00:43:56
homework you're in a couple of places
00:43:57
you'll come across that this is the trick
00:44:00
allows for frequent recording compact grip
00:44:02
and compact sometimes means clearer
00:44:05
usually against compactness if it is in
00:44:07
damage clarity but sometimes vice versa
00:44:09
it turns out the compact year is very clear
00:44:10
because it doesn't even need to be broken
00:44:12
on different lines I can understand this
00:44:14
this suits cover well it happens
00:44:17
healthy
00:44:19
so this topic is already finished
00:44:24
I hope no conditions
00:44:27
so here we are now, look at me
00:44:30
Now let's look at an interesting topic
00:44:32
we'll do it later in front of us approximately
00:44:35
at 11 o'clock there will be many where 15 who
00:44:39
smokes to talk
00:44:41
yes that means you can be a bottleneck
00:44:44
because what the hell, you won't be here
00:44:46
go outside right so when
00:44:48
I'll say break and immediately
00:44:50
drive to as fast as possible smoke and I
00:44:54
then I will forgive the attention that you
00:44:55
came back or didn’t come back so it’s possible
00:44:57
was to continue therefore not
00:44:58
stick around so look what we have
00:45:00
interesting thing is starting
00:45:03
interesting things what is logical 1 and
00:45:07
everyone uses it yes yes I think everyone does
00:45:09
understands how it works you assume
00:45:11
that you use it with logical
00:45:13
meaning you already know what if it
00:45:15
use with other meanings
00:45:16
since this is a java logical operation
00:45:18
The script converts everything to boolean this
00:45:20
as if it’s already obvious I think it’s you
00:45:22
all background now let's go a little further
00:45:24
look what happens when we do it
00:45:28
this operation is fake 3 why
00:45:32
the result is false
00:45:34
so the hard part is the true part
00:45:38
yes, we have operations and that’s why
00:45:39
the result sometimes seems to be clear
00:45:41
and now look how
00:45:44
this is what happened, that is, this is what happened
00:45:48
like Poland, this is like labor
00:45:52
for some reason it turned out to be fake and a corpse
00:45:57
The question is clear, but what kind of [ __ ] is this?
00:46:01
the trick is only in java script I often
00:46:03
I'm trying to understand when I show up I'll show you right away
00:46:05
restaurant because it is wildly healthy and
00:46:07
it then grows further in react
00:46:09
goes on and on and in many places
00:46:13
so look at the good result
00:46:16
look what to do is pitiful
00:46:18
affects and he and operations he
00:46:22
evaluates first operand and blind first
00:46:25
Well, almost always remember the expression
00:46:27
java script calculates
00:46:29
what is the first operand equal to and since it
00:46:31
and incense is false the second operand is possible or not
00:46:34
consider it correct as if the answer already exists
00:46:37
can be very useful because here
00:46:39
for example, maybe there was some kind of challenge
00:46:41
function it just doesn't get called
00:46:43
just much faster therefore the answer
00:46:46
immediately minced meat but there without working in any way
00:46:49
language but in the java script the answer is
00:46:52
not false, but the answer is the first one itself
00:46:56
argument which in this case is so
00:46:58
it happened early
00:47:00
accordingly, right here now
00:47:02
understand how it works compassionate sees
00:47:04
logical means he understands that
00:47:07
screwed up but the operation is logical he
00:47:09
calculates 1 operands it turns out
00:47:12
falsehood transformed ecological
00:47:14
values ​​and therefore there is no need to calculate 2
00:47:17
but moreover, the meaning itself is
00:47:20
the first operand is not false but the result
00:47:23
will be equal to the first operand
00:47:26
while it’s wildly unclear why or
00:47:30
someone understands
00:47:31
yes just for now believe that it is very
00:47:34
it's very important it's very convenient
00:47:36
can't mean accordingly, well
00:47:39
since the first operand is superimposed this
00:47:41
it is precisely this that is the answer, not falsehood, but
00:47:44
the same operand that
00:47:45
transformed falsehood here orbital
00:47:48
liters answer on breathing ok I saw that
00:47:51
that is, for now we are simply considering
00:47:53
cube yes, that is, it’s like a feature
00:47:56
how she uses herself it will already be
00:47:58
in this lesson now look what
00:48:01
it happens to us if our hands are 1 grand
00:48:04
truth or is brought to truth
00:48:06
first operand is true
00:48:08
look what happens in the operation
00:48:10
logical and if the first operand is equal to
00:48:12
true what the answer is equal to
00:48:16
it doesn’t necessarily depend on 2 grands
00:48:19
if 2 there will be a false answer false if
00:48:22
2 corpses everyone understands the answer, that is
00:48:25
the answer is the second operand
00:48:28
saw yes yes just the same logic
00:48:31
stuck on bending because and when there will be
00:48:34
written down then the answer is
00:48:37
since 7 is given by someone's answer
00:48:40
is 5 because 5 reduces to
00:48:44
structure the answer is 7 note and
00:48:48
what you get from changing the positions of the operands
00:48:51
the result depends, this is also important
00:48:55
so now this operation and
00:48:58
considered a similar symmetrical
00:49:00
fun of working with operations and that is, weight
00:49:04
our first operand is true
00:49:06
operations from it the second trend can not be
00:49:08
it is clear that the answer is already here
00:49:11
if the first operand is cast to
00:49:15
so you already know up to 2 grant is it possible
00:49:18
consider the answer to change the first statement
00:49:20
Now, if the first operand is 7 2, you can not
00:49:23
consider the answer is Samokhin that is
00:49:27
for the game and what was given, well, here it is
00:49:31
similar operation not if the first
00:49:34
the operand is false which means the answer depends on
00:49:37
the second operand, that is, the second operand
00:49:39
and the answer will appear
00:49:41
00 this is false means to stand out with the answer
00:49:44
Well, this is minced meat, which means it will appear
00:49:47
everyone feel the logic here everywhere
00:49:50
absolute symmetry of everything to the utmost
00:49:52
logical, but it’s just not clear yet what for
00:49:54
what the hell, I'll be a little later
00:49:57
having corrected it, I need to say something
00:50:00
these
00:50:02
good ones, nothing interesting here
00:50:04
No
00:50:08
passes
00:50:10
so the input/output operators are about alert
00:50:14
I know the console for everything, so nothing here
00:50:17
such
00:50:18
nothing special
00:50:21
so now what is here little one would like
00:50:23
add in combat projects as a rule
00:50:26
all these operators are together by gender
00:50:30
display on a cat that is not a wall and
00:50:32
they poke around, there’s no reason why they can’t be stylized
00:50:35
strong for safety reasons
00:50:37
Is there something missing from your website?
00:50:38
asked and you didn’t even understand what
00:50:41
in fact, they carried their password at all
00:50:43
Not
00:50:44
somewhere but not windows for example
00:50:47
I recommend it, but in reality it’s like this
00:50:49
very little protection of course yes because
00:50:52
that a person can still write to you
00:50:55
a page that looks whatever you want and
00:50:57
I still ask you for anything
00:50:58
but nevertheless for some reason it is believed that
00:51:01
These windows should have been banned
00:51:04
sterilize
00:51:05
Accordingly, they are almost never used
00:51:08
web pages usually ask some kind of
00:51:10
questions or accept answer from these
00:51:12
thoughts whose form is stored
00:51:16
it seems like they still grow somehow and
00:51:18
do not use torsion bar sandra operations
00:51:23
so now switch
00:51:26
so I guess I know how to do it
00:51:29
works
00:51:30
and switch it and stop for whatever I want
00:51:32
pay attention, you know that java
00:51:34
the script considers this expression and will
00:51:36
compare it with this value this
00:51:40
meaning
00:51:41
the expression itself betis is compared
00:51:43
values ​​without when looking low, that is
00:51:46
if the number here is 5 guests
00:51:48
again if you're free
00:51:53
suddenly
00:52:02
over the poor other operations
00:52:05
Vladimir
00:52:08
Everyone knows about the ternary operator.
00:52:10
whose three operands you understand as he
00:52:13
works and
00:52:14
Is anyone embarrassed about any questions?
00:52:17
no question no one is embarrassed
00:52:19
Raise your hands who is shy
00:52:21
set
00:52:26
this is a very useful thing
00:52:30
used many times explained many times
00:52:32
where it is explained quickly so let's
00:52:34
I’ll just repeat that there are three operands
00:52:36
here are the first second and third java deaths
00:52:39
consider the meaning of this expression and if
00:52:41
it is true then this is the meaning in
00:52:43
variable and if false then this
00:52:45
Everyone understands the meaning of tattoos well and
00:52:49
we have just such an operation which
00:52:53
called type of it allows
00:52:55
check
00:52:56
argument which is visible to the argument of this
00:52:59
operations notice this is exactly the operation
00:53:02
Usually operations are designated by different
00:53:04
icons like plus multiply and so on
00:53:07
but there are no kupa icons for all operations
00:53:09
Enough some transactions are recorded
00:53:11
in words this is one of these one of these
00:53:14
examples, that is, look at me
00:53:16
variable age number accordingly
00:53:19
type of each task on
00:53:21
and after that you can put a space
00:53:24
can you use it and what works?
00:53:26
the same, but I don’t dream anything again
00:53:28
because this is an operation let it be
00:53:30
write minus x or you can in Minsk
00:53:32
in parentheses without changing anything strange
00:53:34
so this is also relevant for this OS
00:53:38
gasped the result is firing yes that is
00:53:40
this means actually an object object and
00:53:43
we'll still go through it, well, he needs it
00:53:46
how there shouldn't be an object but we haven't yet
00:53:48
links are simple then a link to and like this
00:53:52
called and probably many people know at school
00:53:54
object maybe I can't say that
00:53:56
the word is again given to the State Duma to rest
00:53:59
All options are listed here
00:54:01
maybe this mute function is probably here
00:54:04
no again symbol but in modern in
00:54:07
browser must also be separately
00:54:09
return character type
00:54:11
and another operation which
00:54:14
called instances now
00:54:19
it allows you to check how it is supposed to be
00:54:22
not to this object to this class
00:54:25
we have not yet studied Serbian objects
00:54:28
programmer is not why you will understand the meaning by
00:54:30
about so simple a basket for example
00:54:32
you described the class as a typewriter and
00:54:35
wrote the class helicopter you created
00:54:37
several variables machine to helicopter
00:54:39
and you can check this variable
00:54:41
she is a true force machine yes then
00:54:45
is is is not the answer
00:54:49
me and examples of using this operation
00:54:52
they will also show it when we study
00:54:54
an object-oriented program can
00:54:56
so now the while do-while for loops are all
00:55:00
know how break and break statements work
00:55:03
continue
00:55:04
everybody knows
00:55:08
about the cat and about you
00:55:11
so about both so I'm here right here
00:55:14
on the break I have one of the examples
00:55:16
one of the layers, yes, that is, look at what's on
00:55:20
in this example I wanted to show
00:55:22
by using
00:55:25
firstly in the for statement remember there
00:55:27
three components that are in vain. They
00:55:31
all optional
00:55:33
they can be omitted but semicolons
00:55:35
necessarily, that is, in this case it is
00:55:37
means the following
00:55:38
bottom club is variable c with
00:55:42
value 25 in each iteration of loop c
00:55:45
increases by one and second
00:55:47
component we write conditions
00:55:49
continuation of the cycle remember the conditions for now
00:55:52
it truly the cycle continues to spin
00:55:53
if I didn’t write the condition in, it means it’s a cycle
00:55:57
eternal, that is, the condition of continuation
00:55:59
all ranges are empty, that is, this is it
00:56:01
example of an eternal cycle I don’t like this one
00:56:04
recording I show I believe that if
00:56:07
if you can't fit your loop into
00:56:10
simple circuit variable such and such from
00:56:12
five to eight don't use the form
00:56:14
use while between only this is it
00:56:17
the recording is very hard to read and unclear
00:56:19
why do you need this form?
00:56:22
this variable needs to be visible from
00:56:24
now until now then how beautiful the shape is so
00:56:29
Let's say we want to solve a problem for us
00:56:31
you need to find the first number after 25
00:56:34
which is divisible by seven I will organize
00:56:36
infinite loop from 25 see
00:56:39
infinite and in each body of the cycle of each
00:56:42
iterations of loop c increased by one
00:56:45
that I am the body inside and remember this
00:56:47
called the body of the loop until
00:56:49
what do I do in the body of the loop I check
00:56:53
is the value divided? This is clear and
00:56:56
this is for her
00:57:13
that is, the operation gives a percentage
00:57:15
the remainder of the division of Circus Massimo
00:57:17
accordingly, if the remainder upon division
00:57:19
the price of 7 is 0 and therefore c is divisible by chi
00:57:22
right it turns out so how
00:57:25
only we will find a c that is divisible
00:57:27
at seven we stop the cycle break
00:57:30
means stopping the cycle completely, that is
00:57:33
termination cyclone cycle ends
00:57:34
immediately and we go to the operator
00:57:37
which was after x
00:57:39
so it’s clear how break works
00:57:42
yes it turns out that when c is equal to 25 this
00:57:46
the myth doesn't work then c equals 26 of them
00:57:49
doesn't work c 27 their doesn't work a
00:57:52
that's when 28 of them work anyway
00:57:55
the break loop is triggered accordingly
00:57:57
ends in the console it says why
00:58:00
why one goal here it is 20
00:58:03
so okay everyone remember how it works
00:58:06
break
00:58:07
and now about that means you asked about
00:58:11
I have a container with a following example:
00:58:13
I'm talking about the config, so let's
00:58:15
we'll try to remind you on the board there
00:58:17
This
00:58:18
I will let you study what I won’t open
00:58:20
now out of cycle
00:58:29
writes
00:58:31
You
00:58:39
yes, that is, look, let’s say our task is
00:58:41
display all house numbers in the console
00:58:44
odd side main 13 because
00:58:47
13
00:58:48
unlucky 40 before that is filling us
00:58:52
variable canvas loop you see goes from 1
00:58:54
up to 11 step 2 so that is, if only
00:59:00
if it weren't there it would be in the console
00:59:02
turned out to be house number 1 ton vr3 house
00:59:05
number 5 so 219
00:59:07
but it was for house 013 that I wrote
00:59:10
containers container means what is needed
00:59:13
finish
00:59:14
current iteration for the year, that is, if
00:59:17
break ends the entire loop to continue
00:59:20
ends only the current iteration and
00:59:22
remember this is called the body
00:59:24
loop and this loop body is executed a lot
00:59:27
once and then each execution is called
00:59:31
interactions yes, that is, for example, look
00:59:34
when let's say in a situation where x
00:59:37
fell asleep equals 9 this one doesn't work
00:59:41
the console is displayed then number nine
00:59:44
then this statement is executed
00:59:46
it turns out halfina 11 doesn’t work
00:59:50
went next terraces heat them not
00:59:52
triggered in the console the house number is shown
00:59:54
11 iterations and ended with Hausu
00:59:58
becomes equal to 13 next begins
01:00:00
operation iv fires therefore iterations
01:00:04
ends right there doesn't reach here
01:00:07
let's move on to the next iteration, that is
01:00:09
cold 15 iv no longer triggers
01:00:12
console street house gaff 15 to clear
01:00:15
the idea is everyone accepts everything accordingly
01:00:17
consoles will see 13
01:00:26
that's what I wanted to show me now
01:00:28
in this example
01:00:30
these three for loops they are all like this
01:00:34
make 1 skin they look some kind of arc
01:00:37
to the console five times
01:00:39
watch 5 again bbc everyone knows what
01:00:43
the console works like this if it's the same
01:00:45
it's easy to withdraw several times
01:00:47
shows how many times this is not a program
01:00:49
started sleeping does this console work
01:00:52
The next question is what do you think?
01:00:55
better recording
01:00:58
Why
01:01:03
that is, there are three ways to make 1 skin like this
01:01:05
but they have a Siemens wedding
01:01:11
any ideas brother
01:01:14
what what have you arrived
01:01:16
I agree with the usual, that is, actually
01:01:20
in fact, everyone always writes in the usual version
01:01:22
I’d like to tell you why now, but what are you
01:01:25
do you mind if you forget about
01:01:27
the habit that you see others like this
01:01:29
something
01:01:32
yeah, look at the first ones from where 6
01:01:36
and here 6 we need to do something
01:01:40
five times what does it have to do with us
01:01:44
Then we will study this concept with you
01:01:45
how to design and
01:01:47
programming
01:01:48
this is the anti pattern called
01:01:50
magic is necessary magic constant that is
01:01:53
some number where it came from not
01:01:55
it's clear if suddenly you imagine that
01:01:58
the program has been carried out to you five times
01:02:01
the command is given, you know it’s no longer 5ok
01:02:04
you open the program and want 5
01:02:06
change to 7 correctly there is no 5 and
01:02:10
this case is of course obvious but
01:02:12
make the race harder and try the teams
01:02:16
it says 4 which is almost a quantity
01:02:18
cardinal directions or something that is it
01:02:21
need to change for 5 years and other than you
01:02:24
you don’t understand that’s why the first option
01:02:27
the bad thing is that there is a doctor needed
01:02:30
this is basically the last option too
01:02:33
not bad but purely accepted
01:02:35
programming, start all cycles from
01:02:38
zero and
01:02:39
finish the operations less they
01:02:43
less than or equal to, that is, they start from 0
01:02:46
before reaching 5 they reach again
01:02:52
feel the difference between these and 5
01:02:55
loops are usually done for any
01:02:58
that is, if you remember, they cannot and
01:03:01
mathematics, then we write it down here
01:03:04
so 05 me including
01:03:07
remember, as a rule, all cycles turned out to be
01:03:11
they do it this way it went apparently back in the day
01:03:14
when you wrote on the server because
01:03:16
there it is more convenient to start from scratch, that is, if
01:03:18
the cycle starts from 0 usually and year
01:03:21
in short, it works, it's fine, so be it
01:03:24
as it became customary in fact
01:03:28
nothing so bad about the last one
01:03:30
option not yes, well, purely traditional
01:03:32
the option is used
01:03:34
so I recommend using it
01:03:37
especially when it might be important
01:03:39
when you have a job for example
01:03:41
write the code the way you want, I just write everything
01:03:43
it was great then that is all three of you
01:03:46
programmers all the other mighty can
01:03:48
write and no third option
01:03:49
problems but if you are doing a test
01:03:51
task for some company, each like this
01:03:54
here's a [ __ ] hook, call extra there
01:03:56
extra questions someone who
01:03:59
your code is this review and we will go there too. This
01:04:01
where you still have to retrain
01:04:04
why did he write so extra
01:04:06
questions with niko it's better to do something
01:04:08
more secure
01:04:10
it's reliable and it won't cause any unnecessary problems
01:04:12
the question is why I asked him
01:04:17
Well, now the topic of strength begins
01:04:20
vital functions functions we actually
01:04:22
In fact, we studied the java script base in course 1
01:04:24
but we studied them very very much
01:04:27
compact to literally introduce to
01:04:30
in fact functions are a huge topic and
01:04:32
quite difficult, we'll try now
01:04:34
go deeper and the functions actually
01:04:37
java-script well, just everywhere but just in
01:04:40
all functions in general in java script are
01:04:43
this type of data is another one, that is, in
01:04:46
the variable can be a number or it can be
01:04:48
lie functions you can call
01:04:50
function and argument and pass the function
01:04:53
function when it returns something
01:04:55
can return a function that's all
01:04:57
sounds really cool
01:04:59
It's weird that not many languages ​​do this, but
01:05:01
It's very flexible very side yes. Yes you
01:05:04
Once you master it you will understand how it works
01:05:06
it's just brutally bright and so for
01:05:09
started just repeating a simple 100
01:05:11
that you probably know what we have for
01:05:14
In general, a function is usually needed because
01:05:16
that we have some pieces of code
01:05:18
repeat, that is, they need to be performed
01:05:20
many times you wrote a function
01:05:22
for example which is love or
01:05:24
sokos then you can call them later
01:05:26
got it if it later turned out that
01:05:29
It's more that it's a leap year
01:05:31
the legs are not so easy to determine, but
01:05:33
so difficult for you, you did it in one
01:05:35
where you rewrote the functions I will add
01:05:37
video and it continues to work like
01:05:39
abortion is very, very healthy and so are we
01:05:43
Fully describe the description first
01:05:45
didn't do anything. only java script
01:05:48
remembers that it is there and then it
01:05:50
call many times she gets
01:05:53
arguments that is, we have a concept
01:05:56
formal and factual arguments
01:05:58
description of fruit you write formal
01:06:01
benefit describe the function in glasses
01:06:04
indicate formal and bright, that is, those
01:06:07
some changes with which you will
01:06:09
then work inside the body and when you
01:06:13
call the function you already specify
01:06:15
specific value that is reduced
01:06:18
this is formal, well, that is, this
01:06:21
these are formal and this
01:06:23
actually
01:06:24
just so you know the terminology like this
01:06:28
sometimes they say
01:06:29
each function can return
01:06:31
the result and javascript of the functions are always
01:06:34
returns the result if you don't enter anything
01:06:37
returned she will return antifa no just
01:06:39
it will happen on its own, yes, that is, no
01:06:42
It’s impossible for her not to return it so easily
01:06:44
It happens
01:06:45
so but now the syntax is first
01:06:49
we are considering the traditional option
01:06:51
we now have two options
01:06:53
description of standard function
01:06:55
classic arrow functions about arrows
01:06:57
I'll tell you more, let's first
01:06:58
classic version and so the words function
01:07:01
and then with them functions and in brackets
01:07:03
formal then in curly braces
01:07:06
function body is written
01:07:09
Curly braces are required even if
01:07:11
body consists of one operators all
01:07:14
equals
01:07:16
here inside this body you can return
01:07:19
some return value and something yes
01:07:22
the function stops working at this moment
01:07:24
or you can just write res that
01:07:27
in this case it will happen
01:07:30
Andy Farid dodges this is all to
01:07:33
write return on define
01:07:35
because she definitely has to
01:07:37
return means here I am, let's give it to you
01:07:40
I'll tell you a little interesting thing
01:07:43
this summer
01:07:49
in fact the city is a chance collective you
01:07:52
you know what at the end it’s like without a period
01:07:53
are put . , everyone saw it.
01:07:56
she definitely
01:07:58
You don’t have to install it, everything will work
01:08:02
in the same way there is a very, very plus flow
01:08:05
cases when behavior depends on
01:08:08
Is it worth it? he's so startled that
01:08:11
you can completely ignore them
01:08:13
you may never be worth it but
01:08:16
traditionally we set
01:08:18
you clearly tell you always remember java
01:08:21
script like any programming language
01:08:23
more your assembly we will apply operations
01:08:26
we say which teams will start we say
01:08:30
I use the create a pregnant woman function
01:08:33
assigned 5 understand this is an imperative
01:08:36
fall team we deliver can deal .
01:08:40
6 means
01:08:41
do how not to talk about different things
01:08:45
do it together, watch me write the left one
01:08:48
the heel also clearly needs to be returned
01:08:50
feelings 5
01:08:53
so that if we write
01:09:02
he will fall down what happens from the point
01:09:04
Justin's view of who eto po will end
01:09:06
here and watch the Baltics together we
01:09:09
get drunk for there wore a equals 5 plus 7
01:09:13
same 1 elevator you know, just really strong
01:09:16
sad other line what's the problem
01:09:17
yes this is a continuation of the same design
01:09:20
not to be mistaken, but this is where he will be mistaken
01:09:23
puzzles because arrest is the only one
01:09:27
operator who can after him can and
01:09:29
Serbs and maybe not go
01:09:32
understand the only one that's why in
01:09:36
this place is a jamb you should do what
01:09:38
spend something to write down exactly in that
01:09:41
same page but at least start
01:09:44
You can continue later, but now
01:09:46
let's see let's assume that
01:09:48
we need to return some beautiful carved
01:09:51
for example, we want to return the design
01:09:54
following
01:09:56
calculate something there for 2000 plus
01:09:59
calculate something there for 2001
01:10:02
and plus there’s something else there for 2002
01:10:07
if you move this first cold
01:10:10
it's not just ugly here you look like
01:10:13
easy to read, you can see that you need to do it three times
01:10:15
cause the same thing to add it all up.
01:10:20
it turns out very well and sometimes it happens that’s a plus
01:10:24
the lines also turn out very beautifully
01:10:27
I would like to think of one
01:10:28
table but as you know Undyne will return
01:10:31
Maybe
01:10:35
boil down to thermal power
01:10:38
that is, once you put a parenthesis
01:10:41
for you this understands it all started
01:10:43
expression he reads it to the end that is
01:10:45
the main thing is to start your path in the line even
01:10:47
if it started just how long
01:10:49
which and what to remember for hockey
01:10:52
come up with a simple thing effectively
01:10:56
so let's look further
01:10:58
here is the function called earlier and
01:11:01
snorkel and tell me actually
01:11:04
these are the meanings I’ll show you all right now
01:11:06
examples they are presented instead
01:11:08
formal arguments and when it works
01:11:10
only function bodies these are the changes
01:11:12
it's already 5 o'clock, that means
01:11:15
so let's give a simple example, we have it
01:11:19
for java courses we describe our fate
01:11:21
function to get days of year quantity
01:11:24
days as that is the function to get the year
01:11:26
after all, functions need blocks to work
01:11:28
she counted how much and how we did it
01:11:32
do we check shares any 24
01:11:35
if they divide we return 366 means 365
01:11:38
so everyone understands what is written here before
01:11:42
So this is our first time using this function
01:11:45
called with the argument 2013, that is, this
01:11:48
moment there was a transition here
01:11:50
this code was executed and er
01:11:53
it was equal to 2013, that's accordingly
01:11:56
returned 365. feature in
01:12:00
thirteenth year, that is, and then we still
01:12:03
since the same function caused horrors among
01:12:05
cops 2012, that is, five happened
01:12:07
transition here and variable n formal
01:12:11
arguments to actually assign
01:12:13
actual value 2012 earned from
01:12:16
despite the fact that bright is already equal to 2012
01:12:19
accordingly yf worked and returned
01:12:23
366 so everyone understands how it works yes
01:12:26
seems to be more or less a basic thing
01:12:28
Now they are teaching subtleties that were not there
01:12:31
aware of basic java-script
01:12:34
look firstly we can call
01:12:37
passing the function and not all the arguments
01:12:40
for example, look I described the function
01:12:42
which takes 3 formal arguments
01:12:44
about the father and displays them in the console
01:12:47
separated by flash drives but called her with
01:12:50
one organ 5 respectively 5 is
01:12:54
actual value
01:12:55
For
01:12:56
[music]
01:13:11
that is, five is the actual value
01:13:13
for an argument and a for a fighter and nothing
01:13:17
passed it on, consider me to pass it on
01:13:19
command
01:13:20
that is, the breeze function poured into the console
01:13:22
5 2 it’s clear how it works okay now
01:13:27
how Moscow 6 brought us a new one
01:13:30
possibility of argument values ​​according to
01:13:32
by default, that is, I have the hryvnia function
01:13:34
said that he has three arguments and if
01:13:37
suddenly you will not be on the shore then assume that
01:13:40
anal 111 that's accordingly here I am
01:13:43
called this function with five and
01:13:45
look what happens I instead of a
01:13:47
passed 5 here it appeared instead of b I
01:13:51
did not transmit anything and therefore it is equal
01:13:53
111 but instead of c he did not convey anything and
01:13:57
there is no other meaning to keep silent either, therefore
01:13:59
it rests equally
01:14:01
I see, but what if I gave all three?
01:14:04
accordingly, all three are derived then
01:14:07
there is 111 it won't work at all
01:14:10
[music]
01:14:12
Well, it was clear, okay now
01:14:16
look what an interesting new thing they have
01:14:19
we have
01:14:20
first we have an array of arguments
01:14:22
secondly, half the way is not strange
01:14:26
official term and that is on the way
01:14:29
we are an array, I will now try to explain
01:14:31
the abyss, but the fact is that the java script is like this
01:14:34
called weak typing
01:14:38
you know other names but that’s not the point
01:14:40
I'll try to tell you what we have
01:14:43
languages ​​with strict typing, for example there
01:14:46
pascal siplus some kind of dried and
01:14:49
so on, that is, in them and for each
01:14:52
you clearly set the variable to go and
01:14:54
which one is she from which one on this
01:14:58
something will follow the engine
01:15:10
kvass machine the machine can drive if you
01:15:13
you have a variable of this type
01:15:16
the car means it can drive all this
01:15:18
that is, what is she like from this immediately
01:15:20
follows its functionality if like java
01:15:23
in the script you have a line that means in this
01:15:24
the lines have indexes, yes, that is, this one
01:15:27
essentially the definition is that she just has
01:15:29
there are indexes determined goes by type on
01:15:31
she string means true juice
01:15:34
in java script those are actually typing
01:15:37
not persistent, that is, some we walked
01:15:40
money kitty stormy different everything like that
01:15:42
how to translate this from one according to the cathedral
01:15:45
side weakness is why many people don’t like it
01:15:47
java script especially those with strict
01:15:49
languages ​​are being transplanted, but it seems to them
01:15:52
this is all terrible anarchy in fact
01:15:54
when you have certain experience you
01:15:55
see how much of this is too much
01:15:57
interesting things Nastya just have
01:15:59
it's flexible but you just need to learn with
01:16:02
work with this and use it in
01:16:04
your goals and
01:16:05
so in fact Moscow is duck
01:16:09
typing or in other words you can
01:16:12
say weak what does it mean
01:16:18
so I guess let's use jackets as an example
01:16:22
Let's say we have some form of goal
01:16:24
And
01:16:26
We
01:16:28
we pull it out and she gets it
01:16:32
she calls to this hole in this jacket
01:16:35
method of what evidence can be the quack method
01:16:39
let's let her have it, that's who she is
01:16:43
crack in any normal language Oleg let's say
01:16:45
so it was written here in parentheses that
01:16:48
pregnant doctor type way to already right in
01:16:51
even compilation time is only when
01:16:53
the compiler compiles this project, it is already
01:16:55
sent once they run to it means so she has
01:16:58
there really is a method to quack everything
01:17:00
everything works great already at the stage
01:17:02
compilations that are in yolks and generally not
01:17:04
some error would already be visible
01:17:07
couldn't call bought find another
01:17:09
kind of which is not there, he would check everything
01:17:13
in advance and when we call this function
01:17:15
from somewhere I’ll write war there now
01:17:20
where let's say I really created
01:17:22
way and
01:17:24
I call this function our f and
01:17:29
I tell you it was in vain that they called it there
01:17:31
let's call none, for example r, they passed it on
01:17:35
everything is no longer the compiler of that
01:17:38
same si plus plus checked it means
01:17:40
here we expect a variable like yes and we
01:17:43
here we are actually passing a variable
01:17:45
like everything fits right
01:17:47
and everything can be checked in advance even
01:17:50
then the code execution stage of the java script
01:17:52
this is not to be, we just call
01:17:55
feature advanced something its this
01:17:58
something is called kolyan in this case
01:18:01
I passed it so everything works but if
01:18:04
suddenly I instead
01:18:06
transferred well I don’t know there is a tiger
01:18:11
r2 what do you think will happen now
01:18:16
edges as soon as the function starts, it will be called and
01:18:19
Janoski will try to get him high
01:18:22
this object has a crack, this one has it
01:18:25
there is not only me, probably not even then
01:18:27
an error will occur here, well in this class
01:18:31
to my own described, we decide for ourselves
01:18:33
what kind of thing is this? yes the tiger we can the tiger
01:18:36
we can ask the wrong crack mother
01:18:39
we describe this class as we want it
01:18:41
haven't passed it yet, I'm still trying to understand
01:18:43
just give it and then we'll call this one
01:18:45
function is a problem even though the game will cause
01:18:48
him the quack method because he understands that
01:18:50
is manual typing no matter what
01:18:54
what type of object is it important that it
01:18:56
knows how to quack since he knows how to quack
01:18:59
functions will make him quack and what
01:19:01
sleep games dude it doesn’t matter, it’s clear
01:19:04
approximately what am I talking about yes I then
01:19:07
I'll stop here, we're doing the same thing
01:19:10
we can if someone is already a little familiar with
01:19:12
with these hashes we can here I am please
01:19:14
look, I'm describing the hash, I'm not saying what it is
01:19:17
this stacking hashes and this is the function
01:19:20
who do that is also not an object
01:19:23
ordinary and shexne yes yes he has
01:19:26
elements creo que all will be called and that's it
01:19:29
it almost gets to this function is trying
01:19:31
there was a change create this one works
01:19:33
approach although it is not an object at all
01:19:35
some class is ordinary
01:19:37
simple object
01:19:39
chestnuts everyone knows dated so I
01:19:41
use while singing
01:19:43
you see, it works differently
01:19:46
typing Putin and I just drove bye
01:19:49
term duck typing so you like
01:19:50
once again now, using an example here
01:19:52
this is a duck array explain why
01:19:54
street, well, that means during work, anyone
01:19:58
functions we have showing let's call it
01:20:01
array argument and in this array
01:20:04
argument all the arguments that were
01:20:06
functions are transferred, that is, look here I am
01:20:08
indicated and I gave her the function itself
01:20:12
actually expected but only a
01:20:15
accordingly it is clear that this is it
01:20:17
passed to this variable correctly here
01:20:20
to the console this is a pain function to the console
01:20:22
your your client and here he is aaaaand after
01:20:26
it displays the length of the array
01:20:29
argument not she turns out to be 2 because
01:20:33
the function is passed two arguments and then
01:20:35
this loop over everything
01:20:37
array argument and prints everything
01:20:41
get all the arguments here they are
01:20:45
if they were afraid passed 5 moment they would all
01:20:48
here that is, the function can receive
01:20:51
access and even to those arguments of which
01:20:53
it wasn't stated that way in the description
01:20:56
for example it works you probably know
01:20:58
there are a lot of us. min until you know this one
01:21:01
the thing finds the minimum of all arguments
01:21:03
you can give it as much light as you like
01:21:06
all likes like this like this such functions
01:21:09
you do it yourself again like this
01:21:10
functions can be done but I'm not sure yet
01:21:13
called the array the argument is actually an array
01:21:15
in fact, this is not a Mosin, this is again in pro
01:21:18
simple and who only has
01:21:20
lens and only properties 012, for example,
01:21:24
any array has a remember icon there
01:21:27
join date methods and even these methods
01:21:30
the argument will therefore cannot be called
01:21:32
massively this is dishonest mass this is something
01:21:35
pretending to be very simple
01:21:37
array, that's why Putin says array
01:21:40
that is, if you hear the word Putin
01:21:41
array or something else makten
01:21:44
which means, how about you, it’s not an array, it’s just
01:21:46
rest in some sense behaves like
01:21:48
the majority of us will still have such things
01:21:50
meet in other places sometimes they
01:21:52
even much more complex than the masses but
01:21:55
they just pretend to be arrays so that
01:21:57
you could work with him as you usually do
01:21:59
work with the masses until the idea is clear
01:22:05
that's good and so this thing with
01:22:08
argument it always worked and this mask
01:22:11
of us is another syntax
01:22:14
like this, that is, we can say
01:22:17
what this function can it receive
01:22:20
as many arguments as you like, here I am to fight
01:22:22
almost conveyed and what does this mean
01:22:26
this will go here this will go here
01:22:29
but these two will go here
01:22:34
Yes, it’s clear, that is, you know, if the argument
01:22:36
this is an array of all arguments
01:22:39
then this is the excitement, this is just an array
01:22:42
other arguments saw the difference here
01:22:47
and this is an honest array that is not real
01:22:50
pull
01:22:51
so let's see, I called him
01:22:53
abcd what does this function do it in
01:22:56
the console is releasing the album here they are
01:22:58
turn on aigul
01:23:00
and then it prints the length of the other array
01:23:03
here it is, these two are both here doing a cycle in
01:23:07
all this element of the array breaks
01:23:09
drives, they aim and so everyone understands
01:23:11
what did you get here who is already overheated
01:23:15
wash yourself well, hold on, so I
01:23:19
I saw something good here and wanted to show it
01:23:21
this is the thing and
01:23:24
and someone can call her differently
01:23:27
calls spread heard this word
01:23:29
someone calls ellipsis someone else
01:23:32
when I want to clarify a little
01:23:34
so that you understand what the words mean
01:23:38
ellipsis is actually the name
01:23:40
this symbol that I highlighted
01:23:42
ellipsis then he is exactly the same as
01:23:45
for example, look at this!
01:23:49
symbol name ! but its role is java
01:23:52
in the script the logical logic is not correct so here it is
01:23:56
this symbol that you are behind the stage of liksys
01:23:58
but its role in this case is spread
01:24:01
operator that is everything about he forces
01:24:04
some things
01:24:05
decompose inside the array and for
01:24:08
that's why it's called a spread, that is, a spectacle
01:24:12
name series symbols perform a role
01:24:14
so 2 names test two names in
01:24:16
in different places this is the problem that
01:24:18
there are two of us out of spite what day
01:24:20
so good now look I will
01:24:23
show examples of what a function is
01:24:26
one of the data types is the same as integer
01:24:28
number string and so on one of
01:24:31
the most important features of java script are one
01:24:32
one of the most
01:24:35
can I say this so we have
01:24:38
faction data type accordingly is
01:24:40
bank type variables
01:24:43
so look, he describes it, I’ll draw it
01:24:47
that is, normative
01:25:01
I wanted this function so what does it do?
01:25:06
so I call it accordingly this is what
01:25:08
she does it, but I typed into the console
01:25:10
of f1 remember that year determine the type
01:25:13
its argument f1 this function that is
01:25:16
f 1 is not any specific
01:25:19
strange design it's the same
01:25:21
the expression is like any other, that is
01:25:24
where do I find out you found out that I personally can
01:25:27
create some variable name i
01:25:29
put f1 got fancho because f1
01:25:32
this is the variable in which the function lies
01:25:36
in some, change mode is an integer value
01:25:38
other functions of these something else here
01:25:42
now look a little further I
01:25:44
declared function f 2 and now
01:25:46
ordinary variable f2 lev
01:25:50
the variable is assigned to it 2 now I have
01:25:54
the topic of this variable and in this variable
01:25:57
the same function of the 1st floor actually
01:26:02
in fact, these are links to one function, but we
01:26:05
the term is dry until I wanted it, I think
01:26:07
I'll tell you and I can call this
01:26:10
so these are two brackets these are
01:26:13
operation from a function call operation
01:26:17
remember the plus sign is a binary plus
01:26:19
parentheses are a function call operation
01:26:22
you remember we have the concept of prefix
01:26:25
them postfix on the operation before the bracket
01:26:27
what kind of operation is this
01:26:30
postfix on I and ours is written after
01:26:32
operand yes, that is, the operand of the operation is here
01:26:36
this is a function call, that is
01:26:38
$ 2 brackets should be any
01:26:41
function expression in this case
01:26:44
here is a variable of type function and here it is
01:26:46
beautiful called the street yes here I am
01:26:48
I'm checking secretly from this f2 reef, it's the same
01:26:51
I get hanshi between r yard and f2 no
01:26:55
no difference it's the same thing
01:26:58
it turns out that I can do it like this
01:26:59
I can write a function like this, well
01:27:01
for duplicating her description we can say
01:27:03
result
01:27:05
let's go a little further, I describe the function
01:27:10
f 3 so so I'd like to be here
01:27:16
I forgot what the trick is here
01:27:19
I remembered everything, look still then
01:27:23
I described the function using function like this
01:27:27
I'm telling you how it would turn out
01:27:29
variable f 2 function type and now I
01:27:31
I even explicitly say that this is a variable
01:27:33
see variable f3 and what I have
01:27:37
welding description of an unnamed function
01:27:40
notice after filing no
01:27:42
here is the result exactly the same, that is, I'm in
01:27:45
f3 put the function now repeat
01:27:49
function here I called it here it is
01:27:51
it worked, so I checked it secretly
01:27:53
studied, yes, that is, between this
01:27:58
description and such a description almost
01:28:00
there is no difference there is very subtle
01:28:02
the difference to the lower levels can
01:28:03
ignore 2 ways to develop one and
01:28:06
Same
01:28:07
here is finally the last option too
01:28:09
just take a look at the argument
01:28:12
variable in variable in 4 lies
01:28:14
function receiving one argument here I am
01:28:17
called this function passed an argument and
01:28:20
so she brought out what she wants to show
01:28:23
so you feel that the functions are simple
01:28:26
Saint Arnaud yes we can rearrange them
01:28:28
from date variables baby thread
01:28:30
piece
01:28:32
so good now they were traditional
01:28:35
functions according to the classic ones that were
01:28:37
the very birth of Dzhurovski in Moscow in
01:28:40
honor we have a new syntax
01:28:42
functions that the hare functions with he more
01:28:45
compact and has a couple of new
01:28:47
interesting features you already understand what you need
01:28:50
will reconsider
01:28:54
who has time
01:29:04
as long as you are sure
01:29:09
a little bit different from different
01:29:12
written all are all similar you are right if u
01:29:14
Do you have programming experience in another area?
01:29:15
language you have a lot of things we are here on the floor here
01:29:18
okie means if anyone wants a video
01:29:20
write to me please give me a video
01:29:22
I will need your item because
01:29:26
there is a free right to provide so
01:29:29
look at the syntax
01:29:31
it is through the bar that the name is of war
01:29:35
functions equal to and before I show you
01:29:38
the last example was here
01:29:39
function arguments and body are written
01:29:43
look here what
01:29:45
arguments in parentheses then icon right
01:29:48
arrows to the right and then some
01:29:51
expression which is the result
01:29:53
calculation results works and functions
01:29:55
that is, a more compact option
01:29:57
Please note I am not showing how here yet
01:29:59
let the body be described for now
01:30:01
it is assumed that most functions
01:30:03
just return one value
01:30:06
and the calculated map for example I will be this
01:30:08
what the calculated function showed
01:30:10
number of days in a year remember she
01:30:12
received an argument based on it
01:30:15
simple calculations and returned 3536 from this
01:30:18
all logic accordingly the majority
01:30:21
functions is exactly what they do, they simply
01:30:23
return some calculation based on
01:30:26
I show you my own arguments
01:30:28
this option will come a little later
01:30:30
I’ll show you more generally, so look, let’s say
01:30:34
we want to write a very important function
01:30:36
who will find out any
01:30:39
the specified number of hours, that is, we
01:30:42
we will give 5 hours and she will return how much in
01:30:45
them minutes, that is, multiply by 60 to
01:30:48
the brilliant idea is clear
01:30:50
just to show how it works
01:30:52
The functions of the arrow cannot be described yet
01:30:54
there are, please note, no curly braces
01:30:56
no reason just after the arrow
01:31:00
we write down the expression
01:31:02
that is, as if you think that
01:31:04
wrote a carriage written and then this
01:31:07
you just don’t have to write this expression and
01:31:12
now I'm looking at the console is important in
01:31:14
five hours how many minutes do I call the function
01:31:17
get me persons here she is and 5 that is
01:31:21
meaning for this formal
01:31:23
moment, the result increases accordingly
01:31:26
throughout the entire function this is a finite number
01:31:28
multiplied by 5 equals 60, that is
01:31:30
this expression is equal to
01:31:31
63 here it is so you saw this syntax
01:31:36
Yes
01:31:37
it is not the most general, it is the shortest
01:31:40
in general not now a little forward then
01:31:43
there is a return but there are no curly ones here
01:31:44
no brackets this is important now I'm here
01:31:47
the argument half hour rocks did not take into account
01:31:51
parentheses if the argument is exactly 1
01:31:54
you don’t even have to write them, that is
01:31:56
It turns out that in general these are the records
01:31:58
I will often use this entry in general
01:32:01
its functions are shown by arrows
01:32:03
it's a brilliant idea, that's how I already am
01:32:06
today told a lot about the functions of this one
01:32:08
from data types or will often be
01:32:10
deal with what to pass to the function
01:32:12
as an argument you probably all
01:32:16
saw foreach take its array . for
01:32:18
which array . map everyone is Khan's friend
01:32:21
you pass web for each as
01:32:23
function arguments is true if and
01:32:26
write in the form of an arrow record
01:32:28
it turns out very simple and clear to you
01:32:30
you don't even need to describe it separately
01:32:32
we really need it together
01:32:36
so it turns out compact, that’s it
01:32:40
so you can remove the brackets then it works
01:32:43
here's a simple recording exactly the same
01:32:44
works but but if there is more than one argument
01:32:47
0 or two or three then parentheses are needed
01:32:51
be sure to install it then
01:32:53
if suddenly the arrow function should not
01:32:57
just calculate the expression like here
01:32:59
said, but do something anyway
01:33:01
some kind of logic by the Scythians there and so on
01:33:03
then let's move on to something more complex
01:33:05
option after the arrow you can put
01:33:09
curly braces and internal
01:33:11
write down anything like this you do
01:33:13
so far diwali in the usual function that is
01:33:15
look at the get top 2 function
01:33:19
receives a formal argument with
01:33:21
and does the following because they are
01:33:25
curly braces means you can inside
01:33:28
write down whatever you want like you do
01:33:30
done before with date return statements
01:33:32
everything works as before, it turns out that
01:33:34
this is the recording, it's not much better
01:33:37
than what was fudge is simply not here
01:33:39
the words fudge there is the word fountain and
01:33:42
there is a curly arrow arrow here
01:33:43
that's all and the whole difference turns out to be
01:33:46
records
01:33:47
therefore there are no big advantages, but
01:33:50
arrow functions there are other miracles I
01:33:52
then they stopped it and
01:33:56
there is no argument arrest operator working
01:34:00
this one with an ellipsis but the argument is not
01:34:02
work today is almost never
01:34:05
don't use arguments because I
01:34:07
then I’ll show you the slides and show you examples
01:34:09
that there really are some things
01:34:11
which sharply slow down the speed
01:34:14
so something becomes a problem
01:34:16
for example, 1050 times and strangely enough
01:34:20
using this particular array
01:34:22
argument slows down the code immediately because
01:34:25
which, in essence, its use does not provide
01:34:28
browser to apply optimization techniques
01:34:31
code
01:34:32
T-shirt so that the browser can
01:34:34
the code needs to be optimized so that it
01:34:36
used and followed certain
01:34:38
rules and one of these rules is not
01:34:40
used by two me then that's all
01:34:42
I'll show you that is, don't worry yet, I'll
01:34:44
I’m just explaining that they didn’t remove it in vain
01:34:46
come to their senses they removed him from support
01:34:49
rs3 functions exactly how to speed up to
01:34:52
say use the rest operator in this
01:34:54
the script has arrow functions there is a risk
01:34:56
you don't need to think through the operator at all
01:35:00
good that
01:35:03
I haven't said anything good about the dots yet
01:35:06
, said so so
01:35:10
yes now look
01:35:16
small simple example
01:35:21
let's say we have an arrow function there
01:35:24
f equals important to us on let's say without
01:35:27
arguments and she should if she should
01:35:31
was just to return and then let’s say she
01:35:33
gets it for what the mother can do for 5
01:35:35
That's all I wrote, so everything works
01:35:38
now let's assume that she
01:35:40
should return a hash or an object whose
01:35:44
one of the properties is equal to 5, that is, for example
01:35:46
its task is to return the next thing
01:35:50
what was that is like this
01:35:55
that is, I can try here like this
01:35:59
I want this function to return to you
01:36:07
I understand the idea yes
01:36:09
to
01:36:11
trigger line
01:36:13
I put two brackets
01:36:17
curly braces meant that I would
01:36:19
Here write the body functions are normal
01:36:22
in poetry and so on and I will clearly write in a row
01:36:24
I understand the problem, yes, that is, because
01:36:27
curly braces like many others
01:36:28
just5 characters multiple roles curly
01:36:31
the brackets are part of the hash literal or
01:36:34
object curly braces is a selection
01:36:37
code block in myths in function loops
01:36:40
and so on, yes they have three roles but
01:36:42
It turns out that these videos will interfere with eating
01:36:45
so need some
01:36:47
state
01:36:50
quotes reveal stage
01:36:54
if I put pebbles here and
01:36:57
xcode
01:36:59
what else and cattle and brackets why and only
01:37:04
parentheses its the rock of today's show
01:37:06
We put brackets in a circle like this
01:37:10
seeing the parentheses java swing understands everything
01:37:13
the expression began and everything was already in good spirits
01:37:16
expressions please want figures
01:37:18
buy what you want, all the main thing is that he
01:37:20
I realized that there is no code block yes
01:37:26
no Yes
01:37:29
don't understand, that is, look, if I
01:37:32
I’ll write it so it turns out that it’s a java script
01:37:35
understands that the code block has started
01:37:37
there is this block you need to complete
01:37:41
here they wrote oao x java drain let's do it
01:37:45
this is the expression
01:37:46
what is it equal to
01:37:50
hash is not the result of errors and expression
01:37:54
I'm hooked meaning but this is where
01:37:58
the function will lead to antifa no after all
01:38:01
our code block means you must
01:38:03
via return geoff number value and you
01:38:06
he doesn't get it back
01:38:07
you see, they don’t help like that
01:38:12
Fine
01:38:17
yes, so now look at us and about
01:38:21
rising description good interesting topics
01:38:23
yes this is the account to enjoy
01:38:32
still saved the slides for the same one
01:38:33
topic, that is, the same topic about
01:38:35
functions I show some tricks
01:38:37
which can be used
01:38:39
that is, let's say the matrix is ​​our task
01:38:42
write an alarm function
01:38:45
we can do this function we can do this function
01:38:48
call and give her a message that
01:38:51
need to show the person before the typical time
01:38:53
for work or we can call you without
01:38:57
arguments and then it should show
01:38:59
some standard message for example
01:39:01
the rise is so clear the idea, let's do it
01:39:04
Let's look at the simplest option first
01:39:05
that is, I call it and pass the argument
01:39:08
this is the function this is its formal
01:39:10
document accordingly this line
01:39:11
this one formally goes here
01:39:14
don't look yet just trigger
01:39:16
console lesson and
01:39:18
time to get to work okay yeah okay now
01:39:21
look we call it without arguments
01:39:24
means the place will be equal to
01:39:29
undefined is correct now look what
01:39:31
does this line look down or
01:39:34
you can go through this today
01:39:38
topic, that is, the result of what will happen in
01:39:40
rise to that is, look if in a month
01:39:44
there was something like this line then
01:39:46
it may remain true that but if places
01:39:51
history, that is, any that is given
01:39:53
minced meat then instead of the word customization
01:39:57
caught the logic
01:39:59
this is one of those uses
01:40:02
that abbreviated logical calculation
01:40:04
show the fish expressions, that is, by
01:40:06
essentially this line means I want
01:40:08
so that if there is a place and it becomes equal
01:40:11
climb
01:40:12
accordingly this line will come out exactly
01:40:14
rise and this is also what the rise looks like
01:40:18
any empty value x pull something else
01:40:21
then she will lead because they will
01:40:22
show your let down, you see
01:40:24
first breakup time to go to work then two
01:40:26
three times so it’s clear how it worked
01:40:30
so let's move on now
01:40:32
with default value second option
01:40:36
look, I describe the function, I say that
01:40:38
its moment of places and by default it is equal to
01:40:41
then also a good good way yes I
01:40:44
I call her with the dictionary, it's time to go to work
01:40:46
accordingly, this value is no
01:40:48
doesn’t play a role and keep silent or
01:40:50
the console displays the message it's time to go to work
01:40:52
I call without arguments
01:40:55
triggered to remain silent and flax and meaning and
01:40:57
so in the console there will be exactly the rise I
01:41:01
calling with an empty line
01:41:04
what happens
01:41:07
empty line I will remain that is
01:41:10
the message will be empty because since I
01:41:12
conveyed something to keep silent other meaning not
01:41:15
it works I passed the pieces
01:41:18
accordingly, look at three different
01:41:20
messages it's time to go to work getting up empty
01:41:22
reported
01:41:25
so let's move on now the topic is interesting
01:41:28
called rise description it's still the same
01:41:31
the best thing to do is to cave in after talking for now
01:41:33
this scope goes through and so on
01:41:35
further, that is, look at the console
01:41:38
I output the variable b is equal to
01:41:41
but note that there is no variable in I yet
01:41:44
I haven't described it yet
01:41:47
then I write barbarian blocked so and then
01:41:52
once again I point out what is equal to you and that is
01:41:54
look what the trick is in the ad
01:41:57
variables made specifically through the bar are not
01:42:01
summer horst namely through war are divided
01:42:03
essentially two parts war in it is equal to 5 g
01:42:08
equals 5 she stayed here
01:42:10
accident in [ __ ] up here
01:42:12
this is called a rise, why a rise
01:42:16
understood why it rose and why it died
01:42:18
exactly the description because this is it
01:42:21
variable declaration with assignment
01:42:24
assignment here and there will be a declaration
01:42:26
lotus page variable at the beginning
01:42:30
the beginning of the scope, that is, this
01:42:31
case at the very beginning of the script, well
01:42:34
it works, this is also a strange thing
01:42:37
that's why it doesn't work like that until 1 steals
01:42:40
that's exactly how it works, that is
01:42:41
will be displayed
01:42:45
if you just declared a variable in we
01:42:47
I can’t do anything yet means not and if any
01:42:50
and here there are 5, that is, in the console
01:42:53
will rest no and 5
01:42:57
so we understood that it’s in English
01:43:00
called hosting the term is so important
01:43:04
now watch the trail
01:43:07
so I declare a variable after years and
01:43:10
I'm trying to get to this ad
01:43:14
tell her what
01:43:16
mistake yes because at this moment this
01:43:18
there is no variable yes this is also one of
01:43:22
count the jambs that were
01:43:23
corrected version and to Moscow 6
01:43:25
Well, you must agree that it’s a strange game
01:43:28
behavior is addressed to change before it
01:43:30
creation she already action meaning no
01:43:32
corr it’s unclear there
01:43:36
here is a description of the constant, the same as years then
01:43:39
there is karst work as well as years in this
01:43:41
sense there will be mistakes
01:43:44
now
01:43:47
we just learned the description of the function
01:43:49
description of functions rather than
01:43:52
the situation is exactly the same, that is
01:43:54
because this is again so much description
01:43:57
function it rises to the beginning
01:44:00
scope is one thing to remember
01:44:03
assigning another case by description then
01:44:05
is that you write function here
01:44:07
what do you write it here makes a difference
01:44:09
no none anyway all functions wherever
01:44:12
they were not described in the code, consider that
01:44:15
they were described at the very beginning
01:44:17
Accordingly, the function can be called before
01:44:20
how the analysis is
01:44:23
work we immediately see some kind of game
01:44:28
like this and now look at me
01:44:32
I describe I described the function now ordinary
01:44:34
as usual with the function keyword
01:44:36
now I describe war ff park differently
01:44:40
f equals minced meat we've already seen this one
01:44:42
design yes here nameless
01:44:45
here is one and one of those places where the difference
01:44:48
the behavior will be the same as the description
01:44:51
or copper ff and assigning a value to it
01:44:54
so you already know that war ff will work
01:44:58
to the beginning and here is the assignment itself
01:45:01
it will only work at this very moment
01:45:03
so here's what you see
01:45:06
anda file and here is what will be displayed
01:45:10
you know what to stand out
01:45:12
if I write the variable f f is equal to a in
01:45:16
this variable, as you know, already lies
01:45:18
functions that you are the text itself is literally the text
01:45:22
functions and respectively can be called
01:45:26
see interpolate here is the text of everything
01:45:29
I'll take you away
01:45:33
I mean, look when I said that
01:45:35
here they will come I said on the previous slide
01:45:37
think that this function is declared in
01:45:39
at the very beginning of the year it’s actually the same
01:45:42
the same thing works and here is this function
01:45:45
these are the ones I’ll highlight now, it’s announced
01:45:47
at the very beginning of the year it’s just that no one is there yet
01:45:50
did not assign variable f dream means that
01:45:54
there is a java script created at the very beginning
01:45:56
year variable ef ef equal to mdf and here
01:45:59
this nameless function but we haven’t yet
01:46:01
we can call I don't have a name and only
01:46:03
this is the moment when we got here
01:46:05
and this nameless function went into this
01:46:08
variable therefore it became possible and if we
01:46:10
let's set a strict regime
01:46:12
that means not everything will work the same way
01:46:14
yes here he is here yes no problem with
01:46:16
this is not but this is like behavior
01:46:19
strange but it's not fraught with problems you
01:46:21
you just have to understand it and that’s it
01:46:23
what's inside the function without war
01:46:26
variables are described globally
01:46:27
really dangerous middle
01:46:31
ran so far so that means he's here
01:46:35
ok not said yet yes not shown here
01:46:39
one very creepy hello indeed
01:46:42
really look
01:46:44
show this
01:46:48
here we have some kind of function
01:46:53
called f
01:46:55
well, you know that for example I’m here
01:46:58
could low city tournament there 5 and
01:47:02
anything
01:47:03
if I write a variable right here there
01:47:07
bar army 5 she acts remember inside
01:47:10
the whole function because they have a van
01:47:12
scope of any
01:47:14
if I describe or in years
01:47:17
it will only take effect inside the div
01:47:20
because jump and the next year
01:47:22
lining but what if I announce here
01:47:26
function
01:47:27
any way f.f. And
01:47:32
This is where I don’t make you guess what
01:47:36
will be because this is the behavior in
01:47:38
standard are not described and therefore each
01:47:41
browse who realized it for what purpose
01:47:43
works unpredictably yes that is where
01:47:46
it will be visible here it will be visible in
01:47:48
at what point will she start doing nothing at all?
01:47:50
it’s clear that’s why this behavior
01:47:52
through the narrow who calls ours that is
01:47:55
description of the function days in the hands of some
01:47:58
Abram visibility block other code
01:48:00
block here it will be
01:48:03
but no one is stopping you from doing it here
01:48:07
By
01:48:12
Fine
01:48:16
a lot of details and probably immediately in
01:48:19
the picture doesn't add up much further
01:48:21
we report a lot of things and these are these
01:48:23
mosaic details that will be available
01:48:25
I somehow carried the foundations to collect
01:48:27
they were going to masterfully they were going to anyone
01:48:30
everything is going
01:48:32
well you are animals
01:48:38
ok yeah I hope it all comes together
01:48:41
that's quite a lot for today
01:48:43
In general, it was the small parts that were kicked out
01:48:47
you understand and know what you need it for
01:48:49
java script and you understand what the language is
01:48:51
java script and we will be finished very soon
01:48:53
studying it is enough for about 2 years
01:48:56
classes then we actually start
01:48:58
study the browser that is those possibilities
01:49:01
who [ __ ] hard are provided with
01:49:03
hand browsers how to draw how
01:49:05
how to work with the heart
01:49:07
steel, that is, something that is not
01:49:09
the language of java scripts in general, but what
01:49:11
is what it is called in other languages
01:49:13
runtime caught yes you are something separate
01:49:15
that the next one is provided
01:49:17
layer that's why now I would say
01:49:20
so many technical details
01:49:22
but they will soon end and go much further
01:49:24
more interesting so and so I wrote before
01:49:28
good night with you
01:49:30
now look at the term the term is very
01:49:35
I’ll write him an important term now
01:49:37
no Slavin
01:49:39
called a pure function
01:49:45
And
01:49:46
to know something like that
01:49:51
appointment
01:49:54
of this disc, yes, look like this
01:49:58
so it was clear that this was a pure function
01:50:01
function that only works with
01:50:03
with your arguments
01:50:04
that is, in brackets it does not refer to
01:50:07
something for no global changes
01:50:09
and it doesn’t fit into the browser pages
01:50:12
she only works with her own
01:50:14
arguments
01:50:16
function a or dobrev who receives
01:50:20
argument and I for example does return
01:50:23
on all can on 5 this is a pure function
01:50:28
it only works with its own documents
01:50:29
and that's it, of course she can cause it
01:50:32
mathematical rounding please
01:50:34
maybe something like that but if I have
01:50:37
there was a global variable g by
01:50:40
functions should not be handled more precisely
01:50:43
technically she can but then she no longer
01:50:45
I'm just trying to understand right now
01:50:47
distribute and what is pure because
01:50:50
I'll be in some homework
01:50:52
clearly demand a clean street here
01:50:55
why is this important the thing is that in
01:50:59
the next year after the development
01:51:02
the next stage is knowledge about
01:51:04
wine
01:51:07
I wanted to talk a little about other testing
01:51:10
that is, you usually write the test yourself
01:51:13
tests, of course there are different tests
01:51:16
unit tests there manual testing is important
01:51:18
but your programmer's task will be
01:51:20
write unit tests, that is, write tests
01:51:22
write your own code another year
01:51:25
which tests previously written code
01:51:27
try to call it and check it done
01:51:31
is it what you need if you write clean
01:51:34
their functions are easy to test if you
01:51:37
write dirty functions before such a term
01:51:39
no, well, as is clear by analogy with
01:51:41
numerically should look at testing them
01:51:43
very difficult because their result
01:51:46
calculation depends not only on the hands of
01:51:48
cops and something else and you will have to
01:51:51
testing not only a function is a task
01:51:53
has testing test uniq then
01:51:55
there is a small piece of code for example
01:51:57
function and if your function is unclean
01:51:59
you have to test everything at once with
01:52:03
all global variables with
01:52:04
somehow there and yak themselves and
01:52:06
web pages and so on this is 100 times
01:52:08
it's harder when you write purely and very
01:52:10
it’s just that each purely function is put
01:52:12
separately because it works nothing
01:52:14
don't depend on
01:52:16
there are so many of them and housing the result depends
01:52:18
only from her arguments the idea is clear
01:52:20
remember this term and I'll talk about it more
01:52:24
Of course I won’t tell you, but always when
01:52:26
just maybe you should try
01:52:28
write exactly clean even if it’s obvious
01:52:31
it’s not said better write clean ones for example
01:52:34
if the task is to ask
01:52:36
I don’t know the user there, the odds
01:52:39
Corgiga type of quadratic equation
01:52:41
fighters and find the roots and everything using code
01:52:47
it means you understand that something will have to happen
01:52:50
it cannot be asked by the user
01:52:52
make a pure function right means y
01:52:54
you should have a separate pure function
01:52:56
which you pass on and the fighters she
01:52:59
rotates the roots and separates from which
01:53:01
asks the user for something
01:53:03
calls this pure function i.e.
01:53:05
you break down the functionality into pure and
01:53:06
unclean pure will be easy to test
01:53:09
they are usually clean, very easy to ask
01:53:11
the user and you are to the credit of everything therefore
01:53:14
it was tested for yes you see
01:53:16
try so I will of course talk about it
01:53:18
it's not for us to say
01:53:20
so so good
01:53:25
Now the scary thing is recursion
01:53:29
what does this kind of love mean?
01:53:33
yes, why
01:53:38
then okay let's see here we have
01:53:41
there is a terrible thing, recursion, the trick is
01:53:44
that a function can call itself
01:53:46
very useful and many things can be done
01:53:49
made only this way let's
01:53:51
first let's look at the non-recursive normal one
01:53:55
function to calculate factorial who
01:53:58
remember what repetition is
01:53:59
earthly everyone is even correct I'm not
01:54:02
I want to scare you, mathematics will not be
01:54:04
a lot yes but sometimes just small
01:54:07
like this, come somewhere like this, I’ll be like this
01:54:09
little things, I think I’ll explain everything
01:54:11
that is, it is not easy and the mathematical basis
01:54:13
you don't need factorial anyway
01:54:15
the product of all numbers from 1 to for example
01:54:18
5 factorial
01:54:21
envious mathematician is one
01:54:26
everyone just let's try and that's it
01:54:30
I describe the factorial function it gets
01:54:33
this is the most 5
01:54:36
volume cycle under it from 2 to 5 why from 2
01:54:42
to 1 there is no point in pressing 15 just
01:54:45
faster yes from 2 to 5 5 and this one here
01:54:49
directly multiply by 2 by 3 4 by 5 and
01:54:52
return it's all easy everything is clear yes
01:54:57
fill in here will not come out on if you are a loop
01:54:59
exactly about n inclusive and they are trying
01:55:02
do as
01:55:05
and you saw exactly yes because I
01:55:08
sometimes now she was 5 me before him and
01:55:10
should only come with elections
01:55:12
here I call the function using 120
01:55:16
now let's try to write
01:55:17
recursive
01:55:19
function that is what I want as for
01:55:22
I started to want to show some idea of ​​flying
01:55:26
look at this, here is the 5 factorial and here
01:55:29
this is it
01:55:31
that is, the factorial volume of this is so true
01:55:34
look from here as beautiful as possible
01:55:37
see what the factorial of pizza is
01:55:41
factorial 4 and
01:55:43
which multiplied by 5 so everyone saw it
01:55:47
yes, that is, repeated for any number
01:55:51
this is the number itself multiplied by the factorial of 3
01:55:54
what do you think creatures
01:55:58
factorial 5 is 5 times 4
01:56:01
factorial 4 urgency is 4 times
01:56:04
factorial 3 and so on yes it is possible
01:56:06
imagine it or so well
01:56:08
let's just imagine this for now and
01:56:10
so nasturtium fact 2 we volunteered it
01:56:13
five don't look at it yet, what is she
01:56:16
does it return 5 times and
01:56:19
call yourself for the fact for calculation
01:56:21
factorial 4 and how does she calculate the factorial
01:56:24
4 it returns 4 times the factorial
01:56:27
3 how to calculate 3 of 3 is 3 multiplied
01:56:32
to factorial 2 factorial 2 is 2
01:56:35
multiply by factorial 1 and here is the factorial
01:56:38
1 there and right here and sewed up we are preparing a kid
01:56:41
you don't have to stop at she either
01:56:44
nano-ram will start to press -1 and then a
01:56:47
that's why it's better that I'm right here
01:56:49
this pastor
01:56:51
[music]
01:56:56
that is, in any recursive function
01:56:59
besides cutting herself out for sure
01:57:02
there will be some condition somewhere
01:57:04
stops this endless challenge and then
01:57:07
is she able to calculate factorial 5
01:57:09
caused herself for 4 she did for herself
01:57:11
for three and so on there must be somewhere
01:57:13
the end is like this and in which
01:57:16
you return a value without recursion
01:57:18
call ready something like that, I hope
01:57:22
you have roughly what we want
01:57:23
do this I called this function and got it
01:57:25
120 what's good about this way
01:57:31
she's disgusting
01:57:32
look, but what's the point of these sets?
01:57:37
why is this better than not at all than us I her
01:57:42
artificially written in order to
01:57:44
show factorial 1 is good only because
01:57:45
that it’s easy to show how it works
01:57:47
how recursion works all this code
01:57:51
it is much clearer and much faster and
01:57:54
he doesn't waste a finger and every call
01:57:57
functions then the consumption of a small piece
01:57:58
memory some know the words stack
01:58:00
stack overflow have you heard of these?
01:58:03
Accordingly, it’s worth calling like this
01:58:06
We have an example of this function with argument 1000
01:58:08
the world get a console error
01:58:10
crowded because she's herself
01:58:12
called him a thousand times and every time she called him
01:58:15
every time she calls herself
01:58:17
end-to-end information is delayed so here it is
01:58:19
when I'm done I need to come back
01:58:20
back here is the return information yes
01:58:23
it doesn't take shape too soon
01:58:24
or late the old man is overflowing therefore
01:58:27
This function is no good except
01:58:29
that it’s easy to feel what it’s like
01:58:35
no good cheek very much and you will be like
01:58:40
since homework on recursion I think
01:58:43
that you will understand well why she is there
01:58:45
needed but we often have different
01:58:48
complex structured data
01:58:50
unpredictable nesting for example
01:58:52
imagine tags on a web page with us
01:58:54
there is a body during the day 3 divas in one case 2 p in
01:58:58
in another it’s 8p and in some there’s a bunch more
01:59:00
something yes and we need to get around it all
01:59:03
there is, for example, collecting all the texts on
01:59:05
pages something like that
01:59:06
accordingly, it is recursion that will allow
01:59:08
do this, that is, what is the amount equal to
01:59:10
of all texts on the pages this means
01:59:12
you need to take an empty variable and pass with
01:59:14
cycle through all this first level and
01:59:17
call the same background for her to come in
01:59:20
above these 2 levels and how is she there
01:59:23
she works, she calls herself what to go through
01:59:25
third level tags yes you understand
01:59:27
that's when she gets to this point
01:59:30
which no longer has subsidiary clients
01:59:32
there is just text for example span only
01:59:34
then the value of all of them is returned
01:59:36
they're all coming back
01:59:39
there are many examples of very good examples and
01:59:42
Believe me, it’s practically super useful
01:59:44
there just if I explain
01:59:47
in a real example you won't understand anything
01:59:49
those who don’t understand yet, understand this
01:59:52
quality is still easy to discuss, but
01:59:54
this is something very easy to show like this
01:59:56
works
01:59:57
I hope you understand this about
01:59:59
let's work it out in homework like I did
02:00:01
already told me earlier now Karl is here
02:00:05
minibus now you understand what to do
02:00:07
to understand recursion you need to understand and
02:00:12
so good it means look you and I
02:00:15
we've studied recursion, you and I are left with
02:00:17
very little time and it’s time for us
02:00:20
then watch homework
02:00:25
review and clarify promotions
02:00:31
yes and
02:00:33
smokes in
02:00:37
let's move on to the topic and
02:00:40
remind me too, I don’t understand, we have homemade
02:00:43
task from
02:00:44
us in
02:00:46
personal account contains face-to-face materials
02:00:49
lesson slides and web version working
02:00:51
notebook for now paper work
02:00:53
the notebook has not yet been given to you next time
02:00:55
they will issue it once, but in this working version
02:00:58
notebooks have a topic n.a. homework
02:01:00
here it will actually contain all 100
02:01:03
homemade creator and now I can give
02:01:05
the first 2, that is, you have gone through enough
02:01:07
material here is this task questionnaire who
02:01:10
was on a course on it alone, you look alike and
02:01:12
the task is the head here just a little bit
02:01:14
width so let's look at it and
02:01:17
so your task is to ask the user
02:01:20
his phylla three separately three components
02:01:23
Full Name
02:01:25
age and gender age again through
02:01:27
against so
02:01:29
do not forget that it will be possible to lead to
02:01:32
number of fingers demand return juice and floor
02:01:34
through confirm scary I'm returning home
02:01:37
true stuffing and then we use the alert operator
02:01:39
we issue this anchor here it's all
02:01:43
understandable years understandable age days this
02:01:46
just 365 higher in age, that is
02:01:48
they don't think about leap days in five
02:01:51
years old you will understand here what if
02:01:53
forgot to convert age to number
02:01:55
that is, it turns out 205
02:01:59
gender is clear age you are retired
02:02:03
it is necessary that men and women have
02:02:05
different retirement ages any
02:02:07
for example, a 55-year-old woman retires
02:02:10
men 60 for example ok yes here I am
02:02:14
there will be other requirements for
02:02:17
execution even if someone did it
02:02:18
photo 1 task I can even do it
02:02:21
try to send again mine is already there
02:02:22
completely different comments and well here
02:02:25
you have to work what else is important here
02:02:28
look there must be control
02:02:30
correctness according to 10th dan, that is, for example
02:02:34
surname first name patronymic should not be
02:02:37
empty if a person will be success we
02:02:39
just ask again you force
02:02:41
introduce him until he sees
02:02:44
Now, if a person used age as
02:02:47
what figure are you forcing him to take again?
02:02:50
enter age you can say something beautiful
02:02:52
message like enter age there so
02:02:54
it consisted of such-and-such and such-and-such, but can you
02:02:56
he’s just asking again, but it doesn’t matter what’s important
02:02:58
what do you force together?
02:03:01
so actually yeah that's all
02:03:04
all this is introduced wave by one operator
02:03:07
couples that is, don’t try to write a lot
02:03:09
art and consider different options and
02:03:11
male female yes no and so on 1 Olya
02:03:13
carries out all the troubles of arranging
02:03:15
use string templates for whom
02:03:18
interesting to practice just good
02:03:19
example you can collect it via
02:03:22
pluses how to paint so is it clear
02:03:25
the task means what I immediately paid attention to
02:03:28
attention
02:03:29
you understand that you have to
02:03:31
convert restaurateur data types
02:03:33
number at least do it in one
02:03:35
place if you have this several times
02:03:38
I will make the sound you will need
02:03:40
redo because the data must
02:03:44
each one is an explicit conversion to
02:03:47
amp parsing and so on it requires
02:03:49
some time to complete and
02:03:52
It’s clear that if you write there many times
02:03:54
in the questionnaire, of course, it doesn’t matter, but the muscles
02:03:56
preparing for the combat year before early or
02:03:58
it's too late you'll have to commit to a serious project
02:04:00
where no one will allow you once desperately
02:04:02
just out of the blue this one
02:04:04
nonsense
02:04:05
it should be done in one place and in
02:04:07
in many cases implicit
02:04:09
transformation for example if you have age in the form of a string
02:04:12
you it in years you you can multiply by
02:04:15
365 and it will work but under the hood there will be
02:04:18
implicit conversion yes that is
02:04:20
remember multiply converts a string to
02:04:22
number ak5 waste of time besides
02:04:25
since she's not overtly cold
02:04:27
makes you not think about it and you
02:04:30
you may not notice that she is on
02:04:33
actually exist, that is, not realize
02:04:34
what is sooner or later then this
02:04:36
somewhere someday it will shoot you will forget
02:04:38
What's really in this change?
02:04:40
string not hours until long then fold
02:04:42
didn't notice and are lazy the worst thing is
02:04:45
you guys were such smart guys and wrote the code later
02:04:47
you plus 500 in years and fall on
02:04:49
she came to another post of yours
02:04:51
fresh man and brin he edits the code
02:04:54
and everything falls apart against everything being right
02:04:56
does but in fact you just forgot
02:04:57
convert to a number therefore if you
02:05:00
need age in the form of a number and comes in
02:05:02
as a string you should get the number 8
02:05:04
as soon as he arrived right away
02:05:07
put it in the number of everything that no one has
02:05:10
who didn't even have a chance to work with
02:05:11
line until the logic is clear
02:05:14
so everyone understands
02:05:17
explained and now the second task is just
02:05:20
look at this course
02:05:23
such a wonderful array
02:05:25
we need to write a function that
02:05:27
called there we can stick it to her
02:05:30
convey such an array of people and
02:05:33
she must find the sum of all numbers
02:05:37
the idea is clear, so without recursion the traveler from
02:05:40
everyone understands and because look
02:05:42
it turns out in an array and there are numbers and there are
02:05:45
you need arrays in which, again, from the number
02:05:47
and for arrays and nesting level
02:05:49
unpredictable somewhere one dito2 somewhere
02:05:52
3
02:05:54
this is exactly the sum of the numbers of this
02:05:56
array is 50 but your function should
02:05:59
work with any available array
02:06:01
whatever I predicted, do it
02:06:04
please use recursion
02:06:06
some are especially cunning, I immediately know that
02:06:09
mind by force with, for example, the flat method which
02:06:11
allows you to line everything up in the update we
02:06:13
so on but we are doing this task
02:06:15
because we need to find the sum
02:06:16
number in the array we don't need it we need it
02:06:19
pump recursions therefore precisely through
02:06:21
river all these okay that's who is enough
02:06:25
finishes homework early
02:06:28
gets additionally ask
02:06:30
additional and
02:06:32
the family will not find it more difficult for him
02:06:36
in short, additionally done by
02:06:38
in fact, everything is done according to your wishes
02:06:40
I don't force anyone to do anything they want
02:06:42
homework and not necessarily them
02:06:44
do it before the next lesson if
02:06:46
for example, there is some kind of blockage on you there
02:06:48
work or somewhere else you can postpone
02:06:50
for a while there is nothing with lacie but
02:06:52
then finally you can either not have them at all
02:06:55
do but it’s clear that it’s on defense
02:06:57
graduation projects if I see that
02:06:58
the man didn't do his homework
02:07:00
brought the project to understand it well
02:07:03
calling it that way is why it’s still not up to
02:07:06
try to do them, that's all
02:07:09
I understand everything then classes for today
02:07:12
finished
02:07:14
questions at your disposal
02:07:19
[music]
02:07:22
confirm
02:07:24
it’s clear from the best Russian code no no
02:07:27
no conveyor and to confirm there
02:07:29
the buttons are bad and canceling it with an enzyme
02:07:32
I'm driving through the forts and what didn't push
02:07:34
it will work out
02:07:36
ladies, it is advisable to write for example if
02:07:39
male click ok alaska female
02:07:42
click cancel because
02:07:44
what is your gender and cancellation
02:07:49
regarding 2 it will be possible for the masses
02:07:53
you think to put only from a blank slate
02:07:55
that only numbers now we are now we are not
02:07:58
I haven’t refuted the stability of the code about this
02:08:00
and there is correctness and so on, namely
02:08:02
pump up the rhyme, ok

Description:

On this page you can download the media «JSE_V18 FD2-100-21 2021.09.04 A.00-A.47, N.03, N.05» highest quality possible WITHOUT any restrictions on the number of downloads or download speed.

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 "JSE_V18 FD2-100-21 2021.09.04 A.00-A.47, N.03, N.05" 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 "JSE_V18 FD2-100-21 2021.09.04 A.00-A.47, N.03, N.05" 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 "JSE_V18 FD2-100-21 2021.09.04 A.00-A.47, N.03, N.05" 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 "JSE_V18 FD2-100-21 2021.09.04 A.00-A.47, N.03, N.05" 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 "JSE_V18 FD2-100-21 2021.09.04 A.00-A.47, N.03, N.05"?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 "JSE_V18 FD2-100-21 2021.09.04 A.00-A.47, N.03, N.05"?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.