1、1 外文原文 JavaScript The Definitive Guide JavaScript is the programming language of the Web. The overwhelming majority of modern websites use JavaScript, and all modern web browserson desktops, game consoles ,tablets, and smart phonesinclude JavaScript interpreters, making JavaScript the most ubiquitou
2、s programming language in history. JavaScript is part of the triad of technologies that all Web developers must learn: HTML to specify the content of web pages ,CSS to specify the presentation of web pages ,and JavaScript to specify the behavior of web pages. If you are already familiar with other p
3、rogramming languages,it may help you to know t hat JavaScript is a high-level,dynamic,untyped interpreted programming language that is well -suited to object-oriented and functional programming styles. JavaScript derives its syntax from Java,its first-class functions from Scheme,and its prototype-ba
4、sed inheritance from Self.But you do not need to know any of those languages,or be familiar with those term s,to use this book and learn JavaScript. The name JavaScriptis actually somewhat misleading.Except for a superficial syntactic resemblance, JavaScript is completely different from the Java pro
5、gramming language.And Ja vaScript has long since outgrown its scripting-language roots to become a robust and efficient general-purpose language.The latest version of the language(see the sidebar)defi nes new features for serious large-scale software development. Lexical Structure The lexical struct
6、ure of a programming language is the set of elementary rules that specifies how you write program in that language.It is the lowest-level syntax of a language;it specifies such things as what variable names look like,the delimiter characters for comments,and how one program statement is separated from the next.This short chapter documents the lexical structure of JavaScript. Types,Values,and Variables Computer programs work by manipulating values, such as the number 3.14 or the text “Hello