Hello in this JavaScript video I am going to show you the string object. So a normal string variable you're creating like birthday co Juan equals, and I'm going to put an A string object slightly different you do well, namely what you want on the string because you need the new keyword for your object and the object name and then some initial data to not create another one to conceal direct comparison between the two routes a regular variable and a string object. So now, if we were to do console dot log vol one and OBJ here, now if we reload your hello world, but this you know Got a bit more to it, as you can see it as all the different characters in there, you know the length and we, you know, we can actually access a lot of the properties, you know, we can act with all the property there.
That's the beauty of using an object if you purely just want to contain a string, and you know, potentially the variable might contain a nova piece of data of a different data type, then you want to use a variable u, which is a string and simply want to display it that's a purely simpler that this use a variable, you know, it takes up less memory. And it's easy to write, if you need something a bit more to get to manipulate the string. The string object is the way to go. Because the string object, man, we won this. So that's a property not a method in there, you get a value of 11. So we got five characters for World five 411, four, five foot Hello.
And the space is also a valid character. Well, okay, so there's a variety of methods that we Utilize as well, there's like so many pumps to show you some of the basics. And what I do is I'll provide a link where you can see all of the different methods that you can use to manipulate strings. So what we can do if there is one, very useful is we can have to uppercase nothing you can guess what this does. So this, at this point returns the uppercase version of whatever is stored inside of it. Run it, we get hello world, boys all uppercase.
So if you need an uppercase version, but you might not need it all the time, you can use that method. If you need a lowercase version. I think you can guess what the lowercase version is, as well purely need just the actual string itself. Console dot log J dot value. Now if you run it, we get just a pure regular string. So if you do just need the pure string, that is the way to go the the variety of other methods where you can search inside of it, you can use, you know, regular expressions, you can, you know, have match replay function, you can basically check which character is at a particular index get that character as well.
So, there's so much functionality around string object, like I said, as long as you understand what what we've done in this video on how to do it, you'll be good to go. I'll provide the link to the Mozilla Developer Network, and shows you all of the different facets of string objects. And if you have any questions, feel free to drop me a message as usual. I look forward to seeing you in the next video.