Introduction to the programming language JavaScript

  • 2020-03-30 04:06:49
  • OfStack

What is JavaScript?

JavaScript is a scripting language that is widely used in the development of client-side web pages (browsers), such as to add dynamic functions to HTML web pages, such as responding to various user actions. JavaScript is an Object - and event-driven, secure scripting language that is mostly executed by a web browser.

JavaScript is a registered trademark of Sun corporation in the United States. The latest version of JavaScript is version 1.9, which follows the Ecma international (formerly the European computer manufacturers association) standard ecma-262 (ECMAScript), which is still in development.

JavaScript features

Scripting language

JavaScript is a scripting language that implements programming in the form of small program segments. Like other scripting languages, JavaScript is an interpreted language that is translated line by line as the browser executes.

Object-based languages

JavaScript is an object-based language that can also be thought of as object-oriented, which means it can work with objects it has already created. As a result, much of the functionality can come from methods interacting with scripts on objects in a scripting environment.

simplicity

Writing JavaScript is very simple, you don't need to install a specific development environment, just a simple notepad to write JavaScript scripts. It has basic program syntax and language structures and weak data types that are easy to learn and use.

security

JavaScript is a security language, it does not allow access to the local hard disk, and can not store data to the server, do not allow the modification and deletion of network documents, can only be through the browser to achieve information browsing or dynamic interaction, so as to effectively prevent the loss of data.

dynamic

JavaScript is dynamic and can respond directly to user input without going through a Web service program. It responds to the user in an event-driven manner. The so-called event-driven, refers to in the web page to perform a certain operation produced by the action, called "Event" (Event) : such as the mouse press, move the window, select menu, etc., can be regarded as events. When an event occurs, it may cause a corresponding JavaScript event response.

Cross-platform sex

The difference between JavaScript and Java

JavaScript and Java are two completely different languages. Java, developed by Sun, is a more complex and powerful language and is used in a variety of contexts.


Related articles: