Introduction to the programming language JavaScript, the programming language javascript

Source: Internet
Author: User

Introduction to the programming language JavaScript, the programming language javascript

What is JavaScript?

JavaScript is a scripting language widely used in client web pages (browsers) development. It is used to add dynamic functions to HTML web pages, such as responding to various user operations. JavaScript is an Object-based and Event-Driven scripting language with secure performance. In most cases, JavaScript is executed by web browsers.

JavaScript is a registered trademark of Sun, the latest version of Javascript is version 1.9, followed by Ecma International (formerly known as the European Computer Manufacturers Association) ECMA-262 standard (ECMAScript ), this version is still in development.

JavaScript features

Scripting Language

JavaScript is a scripting language that uses small program segments for programming. Like other scripting languages, JavaScript is an explanatory language that is translated line by line when executed by a browser.

Object-based language

JavaScript is an object-based language and can also be seen as object-oriented, which means it can use the objects that you have created. Therefore, many functions can come from the interaction between methods of objects and scripts in the script environment.

Simplicity

It is very easy to write JavaScript. You do not need to install a specific development environment. You only need a simple notepad to write JavaScript scripts. It has basic program syntax, language structure, and weak data types, which are easy to learn and use.

Security

JavaScript is a security language. It does not allow access to a local hard disk, nor store data on the server. It does not allow modification or deletion of network documents, information Browsing or dynamic interaction can only be achieved through a browser, effectively preventing data loss.

Dynamic

JavaScript is dynamic and can respond directly to user input without passing through Web service programs. Its response to users is event-driven. The Event-driven action refers to the action generated when an operation is executed on a webpage. It is called an Event ): for example, pressing the mouse, moving the window, and selecting a menu can all be regarded as events. When an event occurs, it may cause the corresponding JavaScript event response.

Cross-platform

JavaScript is executed by Web browsers and has nothing to do with the operating system environment. It can be correctly executed by browsers that can run the computer of the browser and support JavaScript.

Differences between JavaScript and Java

JavaScript and Java are two completely different languages. Developed by Sun, Java is a more complex and powerful language and is used in various occasions.


What is JavaScript?

The JS scripting language is the language that is executed on the browser client. It is a program, not a software.
To clarify the concept of a browser (such as IE) = client that you access the internet.
For example, right-click a webpage, click "View Source File", Ctrl + F to find the JavaScript code, and a sentence like this will be found:
<Script language = "JavaScript">... </script>
This code is JavaScript code.
When you fill out a registry form, for example, if the user name is not filled in, when you click the "Submit" button, the dialog box "Enter the user name" is displayed, which is the interaction between the browser and the client, instead of being submitted to the server for interaction, the advantage is that it saves the chance of interacting with the server and shortens the corresponding time.

What is the essence of JAVASCRIPT language and programming practices?

First of all, I only read the excerpt from the book "Essence of dynamic functional language" published by InfoQ. Although it is just an excerpt, it is quite amazing. My comments are as follows: My personal feeling, this is a hard book. This book is not a textbook that briefly introduces a language, nor is it a collection of XX classics that introduce certain techniques. This book is a book that explores theories and explores the paradigm of programming languages, the cost of reading such a book is that you need to lose at least a dozen hairs, and your thinking and concepts about programming languages will become clearer. This book uses the JavaScript language as the medium for introduction, so as to explore the implementation of the language and the features of the language itself. JavaScript, as a language, is very elegant. It has both the characteristics of Dynamic Language and the essence of imperative language. It has both the charm of functional programming and the connotation of object-oriented, javaScript is a tool used to describe the Language Paradigm. Although it has its limitations, it also has its unique characteristics, using JavaScript as the expression language can also reflect some of the views of this book. Although the author believes that language is just a tool, a representation of thoughts, not the thoughts themselves. However, in different languages, we can see the thoughts represented by languages and the essence of their implementations. Of course, this book is a theoretical book, so it is inevitable that it is a bit boring. The author is obviously a science and engineering, and the writing is not beautiful, but some statements are quite brilliant. The excerpt is as follows: 1. A language is just a representation of thoughts, not thoughts. 2. Language is just a tool. The tool's choice is only whether the "function" can be achieved, not what the tool is. 3. Imperative language-> the Von noriman system, with "Storage" and "processing" as the core. 4. The storage in the language is abstracted as memory, and the processing is abstracted into operations (commands or statements ). 5. The core of imperative language: changes data in memory through computation. 6. The representation of data is the foundation of programming. 7. All the efforts made in the development of imperative languages will eventually face the question of "how to abstract data storage ". 8. The interface proposes that only the logical behavior capabilities of the Data body are exposed, and the implementation methods and data features based on such capabilities are not exposed. 9. Object Reference is the source of a disaster in the object-oriented system. 10. Projection of functions and features of the target system and computer system designed for interfaces. 11. Prototype means that if the constructor has A prototype object A, all instances created by the constructor must be copied from. 12. The prototype-based "Build Process" can be simply mapped to "copy ". 13. Design Concept of an object system based on prototype inheritance: separates the inheritance relationship of objects (classes) from the behavior description of objects (classes. The essence of prototype inheritance is actually a process from nothing. Adding...

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.