[Study Notes] JavaScript coding specification-type, Study Notes javascript

Source: Internet
Author: User

[Study Notes] JavaScript coding specification-type, Study Notes javascript

  • Type

Basic Type: when accessing the basic type, the type value should be operated directly.

String number boolean null undefined

Var a = 0; var B = a; B = 8; console. log (a, B); // 0, 8

Note:

1. Call the console in JavaScript to write logs.

2. Open the IE developer tool before you can use the console. By default, an error occurs when you access the console object of IE.


Composite Type: when accessing composite type, you should operate its reference

Object array function

Var a = [1, 2]; var B = a; B [0] = 9console. log (a [0], B [0]); // 9



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.