filmov
tv
44 Floating point literals - Javascript Tutorial 2018
Показать описание
The Full #Javascript #tutorial for #beginners :
Learn HTML, CSS and Javascript :
Javascript Tutorial 2018
This is a Javascript tutorial from scratch for any beginner. Use the above link to watch the full JS video tutorial..
Hey, and welcome back.
So let's continue with floating-point literals.
And in one of the previous sections, we looked at integer literals whereby we looked at the different types of integers and the different number systems that you can use for your integers.
So let’s go on to floating-point.
Now, what is a float? A float number is a number that may have any of the following.
It can have an unsigned or a signed decimal part, decimal integer part.
For example 2, let’s say 2 or it can be -2.
So this is one part and then it can have a decimal point 2 and then the fraction part maybe 2.22, also -2.22.
So that is one float.
So this is a positive float and this is a negative float.
So if it is signed like this one, you see this one has a sign of negative.
So if it is negative, you have to put the sign.
But if it is positive, you can just leave it unsigned but it is assumed that that is there.
So that's why we have the signed or unsigned.
It can be negative or positive.
And then you have the decimal point and then the fraction part or you can have an exponent in place of the fraction or together with the fraction you can have an exponent.
For example this one, it can still be ‘-2.2e’ and then the exponent can also have a negative or a positive.
So if it is maybe -2.2e-3.
Or it can be a number which is positive which will just be exponent and then the number.
These are some examples 96.66.
That's a floating-point number.
This is a floating-point number.
You see -6.89, that's a floating-point number.
9.9E3, that's a floating-point number.
In JavaScript actually, beneath everything all numbers are usually treated as floating-point numbers.
So that's it for this video.
In this video, I just wanted to talk about the floating-point and the floating-point number is basically a decimal, a number with a decimal or a fraction part.
So I’ll see you in the next part where we’ll continue from here.
GET SOCIAL WITH ME:
Learn HTML, CSS and Javascript :
Javascript Tutorial 2018
This is a Javascript tutorial from scratch for any beginner. Use the above link to watch the full JS video tutorial..
Hey, and welcome back.
So let's continue with floating-point literals.
And in one of the previous sections, we looked at integer literals whereby we looked at the different types of integers and the different number systems that you can use for your integers.
So let’s go on to floating-point.
Now, what is a float? A float number is a number that may have any of the following.
It can have an unsigned or a signed decimal part, decimal integer part.
For example 2, let’s say 2 or it can be -2.
So this is one part and then it can have a decimal point 2 and then the fraction part maybe 2.22, also -2.22.
So that is one float.
So this is a positive float and this is a negative float.
So if it is signed like this one, you see this one has a sign of negative.
So if it is negative, you have to put the sign.
But if it is positive, you can just leave it unsigned but it is assumed that that is there.
So that's why we have the signed or unsigned.
It can be negative or positive.
And then you have the decimal point and then the fraction part or you can have an exponent in place of the fraction or together with the fraction you can have an exponent.
For example this one, it can still be ‘-2.2e’ and then the exponent can also have a negative or a positive.
So if it is maybe -2.2e-3.
Or it can be a number which is positive which will just be exponent and then the number.
These are some examples 96.66.
That's a floating-point number.
This is a floating-point number.
You see -6.89, that's a floating-point number.
9.9E3, that's a floating-point number.
In JavaScript actually, beneath everything all numbers are usually treated as floating-point numbers.
So that's it for this video.
In this video, I just wanted to talk about the floating-point and the floating-point number is basically a decimal, a number with a decimal or a fraction part.
So I’ll see you in the next part where we’ll continue from here.
GET SOCIAL WITH ME: