JavaScript String character function

Source: Internet
Author: User

This may be an old message to you, but in every JavaScript string there are several features that are just waiting to do your bidding. This is because the JavaScript string is actually a group of objects of nature and functions (also known as methods) can be in the following general manner:

<script type= "Text/javascript" >
var myString = "Hello thur!";

This are how to would access a property
var myproperty = Mystring.property;

This are how to would access a function
var myfunctionresult = mystring.function (argument1, argument2);
</script>

As you can see, the most important part of getting string properties and functions is to create them first. In this case, mystring is our guinea pig.

What is string music intellectual property?
property is just the object of some basic information. For example, a string object's Length property stores the number of characters in the string.

What is String function?
The function of the string is useful to discover a better understanding of your string. For example, the string split feature allows you to take a series of splitting characters when your supply appears.

It is important to note that these functions do not actually alter the string itself. Instead, they return a new string that you can store for use elsewhere. In our example, we store the results of our illusory functions incorporated into Myfunctionresult.

String functions and properties
The following lessons will teach you how to manipulate, count, rearrange, replace, search and do anything else with your JavaScript string. These advanced topics will open up a new world of choices for dynamic Web pages you have not yet built!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.