JavaScript built-in objects (i)

Source: Internet
Author: User

I. What is an object

1. What is an object: All things in JavaScript are objects: strings, numbers, arrays, functions ...

Each object has properties and methods

JavaScript allows custom objects

2. Custom objects:

Defining and creating an object instance

Use a function to define an object, and then create a new object instance

<! DOCTYPE html>


Two, string Strings object

1. String Object

String object to handle an existing string

strings can use single or double quotation marks

2. Find string in string: IndexOf ()

3. Content matching: Match ()

4. Replacement content: replace ()

5. String Case conversion: toUpperCase ()/tolowercase ()

6. String to array: Strong>split ()

7. String properties and methods:

Properties: Length, prototype, constructor

Methods: CharAt (), charCodeAt (),

<! DOCTYPE html>







JavaScript built-in objects (i)

Related Article

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.