JavaScript phase Summary (1), JavaScript Summary (

Source: Internet
Author: User

JavaScript phase Summary (1), JavaScript Summary (

We have been familiar with the concepts of JavaScript and JQuery in the niugu news publishing system. But what is it? At that time, I simply understood it and did not make any in-depth research. With the deepening of our learning, we are getting more and more deeply engaged in things, and now we have started to learn JavaScript in detail.

This part of learning videos is about 150 sets. In order to avoid forgetting the front and back of learning, it is necessary to summarize the stages. It is a comprehensive grasp of the learned knowledge, it also lays the foundation for the next step.

What is JavaScript?

JavaScript is an object-oriented and interpreted programming language. Client scripting language based on object and event-driven and with relative security.

The target audience should be familiar to everyone. What does the explanatory model mean here? Official explanation: the program does not need to be compiled. The program is translated into a machine language at runtime. Each execution must be translated once. As a result, the operating efficiency of interpreted languages is relatively low, so that some web scripts and server scripts usually use interpreted languages.

 

The second chapter focuses on <Script? The tag is parsed:

Charset: (optional) Character Set specified by the src attribute

Defer: optional, indicating that the script can be executed after the file is completely parsed and displayed.

Src: (optional) web file containing the file to be executed

Type: required. It indicates the content type of the script language used by the Code.

Relatively speaking, we often use the last two (currently we are exposed to this ). At the same time, this chapter also introduces some issues about code embedding:

Embedded: When printing the end character, you need to connect with +:

Generally, external embed is used, and the maintainability is high,

You do not need to add code to the script. You only need to reference it.

The script should be placed under the head as much as possible, generally under the title

 

Chapter 3 briefly introduces the basic syntax and variable declaration, initialization, and assignment.

Note that the case sensitivity issue must be noted when writing code. In JavaScript, uppercase and lowercase are two different characters, which deserves attention.

Chapter 2 introduces the data types and compares them with the previously learned VB:

By comparison, there are several types that exist in both languages, but they are also different:

1. numeric type:

Both languages can be classified into integer and floating point types, but their declaration forms are different. In VB, variables must be specified to be of that type, that is, they must be specified to be Integer, Long, or float. In JavaScript, values can be assigned directly without being specified.

2. Boolean type:

Similarities: both values are true or false. However, in JavaScript, True and False are not 'boolean' type because they are case sensitive. In addition, when the Boolean Type in VB is converted to the numeric type, true is-1, false is 0; but in JavaScript, true and false are not necessarily equal to 1 and 0.

 

Chapter 2 provides an example of operators. These operators are similar to those in C ++, and some are similar to those in VB. The priority of operators is involved in these three languages. We have been familiar with simple priorities for a long time, so we only need to familiarize ourselves with several special types.

 

Based on the summary of the first five chapters of the JavaScript video, it is easy to find that most of the content is similar to the VB content we have learned before, and their content is similar. As Mr. Mi often stressed with us, vb is simple, but after learning well, other languages are basically learned. This is indeed the case. Through this study, we will not only review and consolidate old knowledge, but also understand and grasp new concepts. It is called a new concept because it is not a new knowledge, but a new form of previous knowledge.

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.