🗨️ Discord Server Link for Programmer to Hangout: https://discord.gg/MdScmCsua6 -----------------------------------------------------
⏳TIMELINE⏳ 0:00 Introduction to Unusual JavaScript Output 0:40 Significance of this Video 2:00 Common Challenges Faced by Beginners 3:00 Another Common Pitfall 4:30 Updates on Other Courses 5:10 Resolving Unusual JavaScript Code Issues 7:45 Updates on the JavaScript Course
************* 😍 Must Watch Videos For Web Development 😍 *************
Hello what's up guy my name is Vinod
Badur Thapa but first of all guy you
look at my computer screen we have one constant
variable called sum in which I am
doing 0.1 + 0.2 and I am simply
console it ok I am
directly in JavaScript I
can run it in the bs2 editor, I
don't need to go to the console but the thing is
that you are seeing this, guys,
look at the output here, brother, where
is the output of 0.1 + 0.2, your 0.3 can be 0.300. It is
possible but this is so long and wide,
after zero, where is the four coming from at the end,
what kind of calculation is this, brother, do you understand that
JavaScript, you know, so let me tell you what is the
reason behind this and
first of all, I will tell you this. Let me tell you
why I am making this video, you will think,
why am I making this children's video, but
in reality it is not about children, it is
important for you to understand, you can see that
guys, I am going to bring a World Class JavaScript course
very soon. Don't worry brother, it may take some time
but it is going to be very fun.
Okay, so I was
working on Guy's e-commerce website in this way and here we have
one part where I have to
increment and decrement,
obviously I have to toggle. Neither what
happens there nor that guys, one value comes,
one and when we do increment decrement, then
based on that
quantity, I have to do the same, now
I tell you basically, I have to increase that also,
okay. You can see
here, there comes a time where
I remove it, I am zooming,
look, it came in this way, so I was thinking
brother, what is happening because
whatever I did. It is absolutely equal, see is
n't it, everything is exactly equal, but look again, there comes
a point when the
value is totally different, like the precision
I put that I
want only two digits after the decimal, but It's been so
long, okay, end total, your
tax, final total, everything is here, it's going to be a lot of fun,
guys, you are going to learn a lot in this,
I will
tell you the whole thing in a brand new way, which code you might
not have seen till date, meaning myself. But I hope
athlete now you
know the importance of this video, brother, it is very
important and how such a big
project got such a wide out output.
Think for yourself if you have an e-commerce
website. Made an end like this, you are getting the
output of your total, he will say, brother,
how will I pay for this, if you understand, then
look, let me tell you, then the beginners must be
thinking, oh, this is very easy,
so what will you do, you are simple.
Basically you will do it in this way, whatever
your sum will be, you will dot fixed to it
and you will say brother, whatever is its output,
divide it into two, basically after decimal,
I want only two digits, you will do this right and I know
you did this. Would have thought that
90 of you would have thought the same, okay and
how many had thought, let me know in the
comment section, okay, I run, so
now you can see that guys, I am sorry, I
don't have anything else, otherwise I So
you can see here,
I got equal to 0.30, now you will say wow, it was
very simple, it was ok and I
do one more thing, I am running here as it is now let's say now.
Now I
want to do one more addition, let's say sum
two will be equal to mine, whatever sum one it is,
okay, obviously sum one, what is mine,
0.30, I have to add 24 here, I do one thing,
this is the part, I Let me
make it 20.1, okay, so right now I am commenting on it, now
I have kept it basic, which is absolutely fine, see, first
I got 0.2, here I got 0.20
because I want its fraction, like after
decimal, I got two digits, so he
Given two digits, okay now this is my sum one that is my
0.20 to that I want to add 24
so my output will be
24.2 right simple so I go here
so it's a
sum to control a save Now I am
hitting and boom guys,
what did I say, brother, give me the
output of whatever is mine, make an addition to this,
but brother, what did he
give me, this is my current, is mine the current of all of us?
What year is going on, 2024 has come, I am
telling you, 2024 came, I mean brother, why are
you understanding this 2024, I mean, you are understanding how
strange it is, I am saying strange, I mean right now, it is
happening in a strange way, why is this
happening here? First of all, whatever it was, it is
fine, now there was no problem in it,
but yes, if you make it 0.2, then there will be a
problem, I will tell you
what is the reason behind it, I will also tell you and
what is the reason behind it. Now I will
tell you that also, before that guys, I
want to tell you that this is taking a lot of hard work, it is
really for the course of Java Script, so
please
like and comment this video as much as possible and
share it with your friends. Give it, I will be very happy to
reach out to everyone that the course is coming very soon
and I have already uploaded the world best Mango
DB HTML and CSS course.
Please watch it especially the
CSS video guys.
Share it with as many friends as possible because in this
I worked very hard, this is a 17 hour long video
guys, okay part one is in part two
but I worked very hard, please like and
share this as much as you can
so that it gets ranked so that it can reach everyone for free,
okay then see. Okay, now let me
tell you here, okay, so first of all,
I will make it back to normal, okay, and
now everything will be back to normal,
okay, first output wade, then this, then this, now let
me tell you what is happening. When you are
doing addition in this way, a simple arithmetic
operation, what happens is that the machine understands that
your binary digit is the combination
of zero and then and the machine understands the same as
0, whatever it is, it happens now, isn't it? The
fraction or floating point
number that we are writing is not properly represented when we want to represent it in binary
and its
representation is itself a repeating number,
whether it is your 0.1 or your
0.2. If yes, then what is the repeating number of these two,
if we add then the result will also
come as a repeating number, I have
kept it here, I mean, a definition has been given,
you can just read it yourself,
pause the video.
You can read it by pausing, so that was a major
area. First of all, what we did to fix it was
that I used two fixes
and my work was completed, but
when it comes to e-commerce website. Guys, when it comes to
your e-commerce website, right, in
this way, here I have to
do the complete edition, in that case,
I don't want guys to have any problem with this method.
Okay, so I will tell you
here. What is the problem, whenever you use this
method to fix it,
I feel that
I have got it, I have got 30 paise or I have
got some 0.30 value, but in reality that is
not your number. You are getting type of,
you have to write it, right? Control a save in
reality, it is returning you a string value,
we are dealing with numbers
but to fix gives you a string
and when you convert a string value to
a number. If you go to add with , then
instead of addition, he is troubling you,
basically
2024 means he just added,
he has troubled that which I did not want, so what do we
do or basically, those who are pro developers
know that brother, this So will
give the string, this is the problem, then they
put it inside the brackets, we have the number, method is
simple, in this way, now if I
go here, then the result I wanted is
24.3, I got it, so this is the
steps, which is this problem.
You fix the first one and then
convert it into a number. Simple, if you don't want to
do this, then simple
convert this into a number here and that's it, then
this one will always be your number, so there is no
tension. No, see, this is now your
number. A little while ago, what was its type, it
was string, but now it's your
number, and I got the output I wanted,
so I hope guys, you would have liked today's video
very much. And you
also came to know that JavaScript is coming, work is
in progress, I want
you to know each and every thing with such best explanation,
which will be an e-commerce website, guys, it is
not me, it is you who will create it, meaning,
I will create it. In this way guys, I will put
one thing in front of you, meaning one by one, in this way, we have
a notion over here, okay,
I will show you in even notion also, let
me just delete one, okay,
so you can see. Hey guys, if
you want to know more about the video,
how do I manage my videos, I do
n't have anything, I am keeping everything open, in this way the
parts of the video will be there, everything will be there, so
how can you see one- One thing each
definition is here, what step do I have to follow, what will
be the second step, what will be the third, what will be the
fourth, what will be the fifth, so in this way
we will go one by one, so that only you can know,
well, first we have to do this, then we have to do this, that
means we There is no need to see e-commerce at all,
we just have to complete one task at a time and keep doing it, in
this
way your logic will also be built and
your project will also be completed, otherwise if you
say e-commerce in one go then it is done. That's never
going to happen, then it's okay, it's going to be a lot of fun,
I just want
this guys, it's okay, no one and do
n't worry, there will be no design, the design is going to be very less awesome,
I am doing it in the rough
because logic. The main thing is
in JavaScript, so this is a CSS course, guys, please
share it as much as possible with your friends, I had worked very hard in this video,
please, okay and the complete source
code file, everything has been given, it is better for
you to understand it completely. This is not available even in paid courses, is
not available even in institutes,
I can guarantee you this
because no one is going to tell you for 17 hours,
explained each and every thing in great detail but it is
not ranking because I
made it private. Earlier but now again
its public please share it ok
or this is it guys today I hope
so much for this video and you must have liked it very much
oh my god the screen had disappeared but
it's fine please subscribe
if you haven't. Please do it. Next target is 7
lakh subscribers. So guy, if you have
not subscribed yet then please do.
I will get a lot of motivation and I am going to
upload JavaScript course as soon as possible. Okay,
so I will see you till tomorrow's
video. Thank you. You So Much
Take
[Music]
Care
[Music]