What is JavaScript?
JavaScript is a scripting language widely used in the development of client web pages (browser), such as adding dynamic functions to HTML web pages, such as responding to various user operations. JavaScript is a scripting language based on object and event drive and has security performance. In most cases, it is executed by web browsers.
JavaScript is a registered trademark of Sun Company in the United States. Currently, the latest version of Javascript is version 1.9, which follows the ECMA-262 standard (i.e. ECMAScript) of Ecma International (formerly the European Association of Computer Manufacturers) and this version is still developing.
JavaScript Features
Scripting language
JavaScript is a scripting language that uses the method of small program segments to implement programming. Like other scripting languages, JavaScript is an interpreted language that is translated line by line when executed by the browser.
Object-based language
JavaScript is an object-based language that can also be regarded as object-oriented, meaning it can use objects it has created. Therefore, many functions can come from the interaction between methods of objects in a script environment and scripts.
Simplicity
Writing JavaScript is very simple. You don't need to install a specific development environment, you only need a simple notepad to write JavaScript scripts. It has basic program syntax and language structures as well as weak data types, which are easy to learn and use.
Security
JavaScript is a security language. It does not allow access to local hard disks, cannot store data on the server, does not allow modification and deletion of network documents, and can only browse information or dynamic interaction through the browser, thereby effectively preventing data loss.
Dynamic
JavaScript is dynamic and can directly respond to user input without going through a web service program. Its response to users is carried out in an event-driven manner. The so-called event-driven refers to the actions generated by performing certain operations on a web page, which is called "event": for example, pressing the mouse, moving the window, selecting the menu, etc. can all be regarded as events. When an event occurs, it may cause a corresponding JavaScript event response.
Cross-platformity
JavaScript is executed by a web browser and has nothing to do with the operating system environment. It can be executed correctly as long as the computer that can run the browser and supports JavaScript.
The difference between JavaScript and Java
JavaScript and Java are two completely different languages. Java is developed by Sun Company and is a more complex and powerful language and is used in various occasions.