July 14: JS's basic syntax

Source: Internet
Author: User

First of all, it is the most recent course arrangement:

JS basic Syntax →bom→dom→dom style sheet →js event →js form → regular expression;

Here's what you'll learn today:

First, the introduction of JS

JS is a weakly-typed interpretation language that uses var to define variables. JS to run in a Web environment, and Java can be used on any platform

Second, the original data type JS

    1. Undefined: undefined type and value, no return value
    2. Null: Represents an object that does not exist
    3. Boolean: Only 2 values of true and False
    4. Number: Numeric, can represent 32-bit integers and 64-bit floating-point numbers
    5. String: Character type

Iii. Types of conversions

    1. Boolean (value): Converts the given value to a Boolean type
    2. Number (value): Converts the given value to a digital type
    3. String (value): Converts the given value to a string type
    4. parseint (value): Converts the given value to an integer number
    5. Parsefloat (value): Converts the given value to a floating-point type

Iv. native Objects

    1. Array: Create an array in JS

var arr = new Array (value);

2. Date: Current system time

GetMonth is from 0月-November;

3. encodeURI () encoding; decodeURI decoding

Five, function: a set of statements that can be run anywhere, is the core of JS

Function name (parameter) {statement}

July 14: JS's basic syntax

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.