4. Java Script variable (untype)

Source: Internet
Author: User

No block-level scopes

Data type

There are 5 simple data types (also known as basic data types) in javascript: Undefined, Null, Boolean, number, and string. There are 1 more complex data types--object,object essentially consist of a set of unordered name-value pairs.

typeof operator

While JavaScript is loosely typed, there needs to be a means to detect the data type of a given variable--typeof is the operator that is responsible for the provider aspect information. Using the typeof operator on a value may return one of the following strings:

"Undefined"--if this value is undefined;

"Boolean"--if this value is a Boolean value;

"String"--if the value is a string;

"Number"--if the value is numeric;

"Object"--if this value is an object or null;

"Function"--if the value is a function;

4. Java Script variable (untype)

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.