Introduction
JavaScript Introduction (JavaScript简介)
What is JavaScript?
What is JavaScript? (什么是JavaScript ?)
JavaScript is a high-level, dynamic, lightweight, interpreted computer programming language. It’s designed for creating network-centric apps.
It has made modern web apps possible— apps with which you can interact directly without doing a page reload for every action. It’s also used in more traditional websites to provide different forms of interactivity and cleverness.
(JavaScript是一种高级、动态、轻量级、可解释的计算机编程语言。 它专为创建以网络为中心的应用程序而设计。
它使现代网络应用程序成为可能-您可以直接与之交互的应用程序,而无需为每个操作重新加载页面。 它还用于更传统的网站,以提供不同形式的互动性和智能性。)
JavaScript is mostly used as a part of web pages. Implementations of JavaScript allow client-side script to interact with the user and make dynamic web pages. (JavaScript主要用作网页的一部分。JavaScript的实现允许客户端脚本与用户交互并创建动态网页。)
It’s a programming language with object-oriented capabilities. It’s a very strong client-side scripting language. JavaScript is an untyped interpreted programming language that is well-suited to object-oriented and functional programming styles.
This programming language will help to make your webpage livelier and more interactive.
(它是一种具有面向对象功能的编程语言。 这是一种非常强大的客户端脚本语言。 JavaScript是一种非类型化的解释型编程语言,非常适合面向对象和函数式编程风格。
这种编程语言将有助于使您的网页更生动、更具互动性。)
Things that make JavaScript great and unique:
Full integration with HTML/CSS Simple things are done simply All major browsers support and enabled by default (与HTML/CSS完全集成 简单的事情只需简单地完成 默认情况下,所有主要浏览器都支持并启用)
JavaScript is the only browser technology that includes these three points. Now you understand why it’s the most widespread and powerful tool for creating browser interfaces.
JavaScript helps to create servers, mobile applications, games, etc.
(JavaScript是唯一包含这三点的浏览器技术。 现在,您明白了为什么它是创建浏览器界面最广泛和最强大的工具。
JavaScript有助于创建服务器、移动应用程序、游戏等。)
Why is it called JavaScript?
Why is it called JavaScript? (为什么叫JavaScript ?)
JavaScript programming language was developed by Brendan Eich in 1995. When JavaScript was created it was known as LiveScript. Netscape changed its name to JavaScript. (JavaScript编程语言由Brendan Eich于1995年开发。创建JavaScript时,它被称为LiveScript。Netscape更名为JavaScript。)
Important to know that JavaScript has almost nothing to do with the programming language called Java. The JavaScript name was inspired by marketing considerations. The Java programming language was being heavily marketed and popular when JavaScript was being introduced.
After it was adopted outside of Netscape, a standard document was written to describe how the JavaScript language should work. JavaScript has a long way since it becomes a robust, powerful and efficient general-purpose language.
Why to use JavaScript?
Why to use JavaScript? (为什么要使用JavaScript ?)
Today, JavaScript is one of the most powerful, popular, and flexible programming languages. It provides dynamic behavior on most websites.
JavaScript is used by the overwhelming majority of modern websites.
JavaScript interpreters are included in all modern web browsers—on desktops, game consoles, tablets, and smartphones. This makes JavaScript the most ubiquitous programming language in history.
JavaScript is a programming language that all Web developers should learn. HTML is needed to specify the content of web pages, CSS to specify the presentation of web pages, and JavaScript to specify the behavior of web pages.
This book will help you master the language. (这本书将帮助您掌握语言。)
JavaScript has a lot of advantages like:
Less server interaction (-更少的服务器交互)
Immediate feedback to the visitors (-即时反馈给访客)
Increased interactivity (-提高互动性)
Richer interfaces (-界面更加丰富)
What improvement JavaScript has?
What improvement JavaScript has? (JavaScript有哪些改进?)
There have been several versions of JavaScript programming language. ECMAScript version 3 was the most supported version between 2000 and 2010. Version 4 planned a number of radical improvements and extensions to the language, but it wasn’t done. Then version 5 came out, which made only some uncontroversial improvements, coming out in 2009. Version 6 came out in 2015 and had major updates that included some of the ideas planned for version 4. (JavaScript编程语言有几个版本。ECMAScript版本3是2000年至2010年间支持最多的版本。第4版计划对该语言进行一些彻底的改进和扩展,但没有完成。然后,版本5于2009年推出,仅进行了一些无争议的改进。版本6于2015年推出,并进行了重大更新,其中包括为版本4计划的一些想法。)
Since then JavaScript had new, small updates every year.
The fact that JavaScript is evolving means that browsers have to continually keep up. You should know that an older browser may not support every feature offered by JavaScript.
(从那时起, JavaScript每年都有新的小更新。
JavaScript不断发展的事实意味着浏览器必须不断跟上。 您应该知道,较旧的浏览器可能不支持JavaScript提供的所有功能。)
The designers of JavaScript are careful to not make any major changes that could break existing programs. This is done to allow new browsers run old programs.
JavaScript is not only used on platforms like Web browsers. Databases like MongoDB and CouchDB, use JavaScript as their scripting and query language. Several platforms for desktop and server programming provide an environment for programming JavaScript outside of the browser (for example Node JS).
(JavaScript的设计人员小心翼翼地避免做出任何可能破坏现有程序的重大更改。 这样做是为了让新浏览器运行旧程序。
JavaScript不仅用于Web浏览器等平台。 MongoDB和CouchDB等数据库使用JavaScript作为其脚本和查询语言。 几个桌面和服务器编程平台为在浏览器之外编程JavaScript提供了一个环境(例如Node JS )。)