Hello, in this JavaScript video, I am going to show you the number object so we can create, you know, a simple variable. So we call it R, and we assign the value of nine console dot log. And we could pass it as a parameter to a method save data database using a mathematical calculation. You however we want, if we reload that we get the money now that's pretty cool. But what we can do is create a number object which pretty simple to create it To be fair, let's do new. We've all objects you need to use the keyword new.
And then number, then the actual you know, just a regular number but 67.46 through 098 and print that out. So for the console dot log on reload, we get some slightly different phone number than this And then we got a bunch of other stuff my thinking What the hell is this is because it's an object that has a variety of properties, such as methods and functionality that you can use to manipulate your number. So let me show you some of that functionality. So for the console log, and what I'm gonna do now is use the precision method for the dot two for vision. And if I have a value of three, save that refresh it Princess 67.5. So it's done it to three significant figures.
So if you want to do stuff like precision is great for that and then other other methods as well, you know, show you all of them, but you can easily locate them or do is that I'll actually provide a link where you can locate the all you can see all the different methods, and no one can be like console dot log. If you need, you know, this number, specifically as a string, you can just do.to string. So this will convert it into an ASCII string, which is comprised of character, the game looks the same here. But when you're doing data manipulation point into database, or in doing some more computation, you might need it specifically as a string. You can do stuff like exponential as well, that's too exponential. I'll leave the next test for you.
One last thing that I'll warn you with numbers is not specifically on this number object on this number right here. So just the actual object itself, not our specific object for the console, log number, dot map, underscore value. spell it correctly. Refresh. Why did that not work? Number A little while per location, okay, and I literally pointed to this as well, before reload.
So this just actually tells us the maximum value, our numbers can be as exceeded is a very large number. You can do the same with men, you know, value as well. And there's a few other properties. But this is what you need to know. Any for object is something that contains other properties. It could be variables, it could be methods of functionality around some sort of data.
In this case, it's numbers, and he allows you to easily manipulate those numbers. Thanks for watching. If you have any questions, because this can be a fairly hard topic to get your head around, feel free to pop me a message. And as usual, I look forward to seeing you in the next video.