Brief Introduction to JavaScript variables and data types-Basic Knowledge-js tutorial

Source: Internet
Author: User
This article mainly introduces JavaScript variables and data types. It is the basic knowledge in getting started with JavaScript. If you need JavaScript data types, refer:

One of the most fundamental features of a programming language is a set of data types it supports. These are the types of values that can be expressed and manipulated in programming languages.

JavaScript allows three basic data types:

  1. Numbers, such as. 123,120.50.
  2. Such as "This text string.
  3. Boolean type, such as true or false.

JavaScript also defines two data types: null and undefined, each of which limits only one single value.

In addition to these basic data types, JavaScript supports Composite data types called objects. We will see the object details in a separate chapter.

Note: Java does not differentiate between integers and floating-point values. All numbers in JavaScript are expressed as floating point values. JavaScript represents a number that uses the 64-bit floating point format defined in the IEEE 754 standard.
JavaScript variable:

Like many other programming languages, JavaScript has variables. Variables can be considered named containers. You can put the data in these containers, and then refer to the data to simply name the container.

To use a variable in a JavaScript program, you must declare it. Variables are declared with the var keyword as follows:

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.