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