JavaScript Basics 02

Source: Internet
Author: User

JavaScript Basics 02

1. Data type


The description of the data type has been written to the link in the extension of the previous article

Because the ECMAScript data type is dynamic, it does not have to be necessary to define other data types. This is a very important sentence.

If later data types have chaos in the situation, think of this sentence, you should be able to figure out, this sentence meaning:

The data type can be arbitrarily changed, without any restrictions, it's like a container you're loading things in, you can do this one second

Snacks, the next second to remove the snack replaced with water, these water, snacks and so on is the data type, so on the data type

Don't think it's complicated, it's the other way.

2. Operators are only partially

Subtraction is a very simple mathematical operation, not to mention.

But the problem of the decimal point, we must pay attention to. This is a very important sentence. The links in the previous article are described in detail: links

In this case, the redundancy is a very interesting operator, if we learn the operation flow

That part, and then use if and for to determine something or loop out something, but the input data is not looped out

So much, so what do we do, will definitely use if, but then add a few lines of code, and then make the code complex

Up, however, there is a way to solve this problem, as long as one line of code is completed.

Such as:

I'm going to output 10 numbers, but my array has only five numbers, so what do I have to think about judging so that the array index value

Return to 0 again, can actually use to seek redundancy;

<! DOCTYPE html>

The idea of If judgment

<! DOCTYPE html>

The institutional and the thinking are more complicated than the redundancy.

It's just my subjective thinking.

JavaScript Basics 02

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.