JavaScript Basics Review A

Source: Internet
Author: User
Tags arithmetic operators case statement logical operators

Javascript

first, the data type

A, String

B, number

C, Boolean

1, undefined, false, null, 0, "" The five returned is false;

2, Nan==nan return false,undefined==undefined true;

D, undefined

E, NULL

Summary: There are five types of data in JavaScript and you can use typeof to determine the data type.

Ii. Conversion of data types

A, Cast

a, toString () (undefined and null do not have a string METHOD)

b, String () (universal Conversion)

Nan converts to number

B, Implicit conversion

a, value+ ';

third, the circular statement

A, for statement

B, while Statement (the Whie statement is used when the number of cycles is not determined)

C, do. While statement (requires first operation before judging the loop condition, use the Do...while statement)

Iv. conditional statements

A, If statement

B, If...else Statement (two branches)

C, If: Else If...else Statement (multipath Branch)

V. Jump statements

A, Switch...case Statement

Vi. operators

Arithmetic operators

logical operators

Ternary operators

JavaScript Basics Review A

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.