图书盲袋,以书为“药”
欢迎光临中图网 请 | 注册

JavaScript新语-(影印版)

出版社:东南大学出版社出版时间:2015-02-01
开本: 16开 页数: 437
中 图 价:¥60.5(7.2折) 定价  ¥84.0 登录后可看到会员价
加入购物车 收藏
运费6元,满39元免运费
?新疆、西藏除外
本类五星书更多>

JavaScript新语-(影印版) 版权信息

JavaScript新语-(影印版) 内容简介

  无论你是否喜欢,JavaScript已经无处不在一一从浏览器到服务器再到移动终端——而现在对于你而言,也需要学习这门语言或者掌握更深的知识。《JavaScript新语(影印版)》将指导你进入JavaScript的世界。它由编程老手撰写,他也曾经经历过相同的阶段。  《JavaScript新语(影印版)》将通过四个独立章节来帮助你掌握JavaScript。首先是快速指南,为你讲解足够的知识以帮助你在正确的道路上前行。而更多有经验的JaVaScript编程人员则能在《JavaScript新语(影印版)》中找到全面和易于阅读的深入涵盖各个语言特性的参者知识。

JavaScript新语-(影印版) 目录

Preface
Part Ⅰ. JavaScript Quick Start
1. Basic JavaScript
Background
Syntax
Variables and Assignment
Values
Booleans
Numbers
Operators
Strings
Statements
Functions
Exception Handling
Strict Mode
Variable Scoping and Closures
Objects and Constructors
Arrays
Regular Expressions
Math
Other Functionality of the Standard Library

Part Ⅱ. Background
2. Why JavaScript?
Is JavaScript Freely Available?
Is JavaScript Elegant?
Is JavaScript Useful?
Does JavaScript Have Good Tools?
Is JavaScript Fast Enough?
Is JavaScript Widely Used?
Does JavaScript Have a Future?
Conclusion
3. The Nature oflavaScript
Quirks and Unorthodox Features
Elegant Parts
Influences
4. How JavaScript Was Created
5. Standardization: ECMAScript
6. HistoricaIJavaScript Milestones

PartⅢ. JavaScriptin Depth
7. JavaScript's Syntax
An Overview of the Syntax
Comments
Expressions Versus Statements
Control Flow Statements and Blocks
Rules for Using Semicolons
Legal Identifiers
Invoking Methods on Number Literals
Strict Mode
8. Values
JavaScript's Type System
Primitive Values Versus Objects
Primitive Values
Objects
undefined and null
Wrapper Objects for Primitives
Type Coercion
9. Operators
Operators and Objects
Assignment Operators
Equality Operators: === Versus =
Ordering Operators
The Plus Operator (+)
Operators for Booleans and Numbers
Special Operators
Categorizing Values via typeof and instanceof
Object Operators
10. Booleans
Converting to Boolean
Logical Operators
Equality Operators, Ordering Operators
The Function Boolean
11. Numbers
Number Literals
Converting to Number
Special Number Values
The Internal Representation of Numbers
Handling Rounding Errors
Integers in JavaScript
Converting to Integer
Arithmetic Operators
Bitwise Operators
The Function Number
Number Constructor Properties
Number Prototype Methods
Functions for Numbers
Sources for This Chapter
12. Strings
String Literals
Escaping in String Literals
Character Access
Converting to String
Comparing Strings
Concatenating Strings
The Function String
String Constructor Method
String Instance Property length
String Prototype Methods
13. Statements
Declaring and Assigning Variables
The Bodies of Loops and Conditionals
Loops
Conditionals
The with Statement
The debugger Statement
14. Exception Handling
What Is Exception Handling?
Exception Handling in ]avaScript
Error Constructors
Stack Traces
Implementing Your Own Error Constructor
15. Functions
The Three Roles of Functions in JavaScript
Terminology: "Parameter" Versus '~Argument"
Defining Functions
Hoisting
The Name of a Function
Which Is Better: A Function Declaration or a Function Expression?
More Control over Function Calls: call(), apply(), and bind()
Handling Missing or Extra Parameters
Named Parameters
16. Variables: Scopes, Environments, and Closures
Declaring a Variable
Background: Static Versus Dynamic
Background: The Scope of a Variable
Variables Are Function-Scoped
Variable Declarations Are Hoisted
Introducing a New Scope via an IIFE
Global Variables
The Global Object
Environments: Managing Variables
Closures: Functions Stay Connected to Their Birth Scopes
17. Objects and Inheritance
Layer 1: Single Objects
Converting Any Value to an Object
this as an Implicit Parameter of Functions and Methods
Layer 2: The Prototype Relationship Between Objects
Iteration and Detection of Properties
Best Practices: Iterating over Own Properties
Accessors (Getters and Setters)
Property Attributes and Property Descriptors
Protecting Objects
Layer 3: Constructors——Factories for Instances
Data in Prototype Properties
Keeping Data Private
Layer 4: Inheritance Between Constructors
Methods of All Objects
Generic Methods: Borrowing Methods from Prototypes
Pitfalls: Using an Object as a Map
Cheat Sheet: Working with Objects
18. Arrays
Overview
Creating Arrays
Array Indices
length
Holes in Arrays
Array Constructor Method
Array Prototype Methods
Adding and Removing Elements (Destructive)
Sorting and Reversing Elements (Destructive)
Concatenating, Slicing, Joining (Nondestructive)
Searching for Values (Nondestructive)
Iteration (Nondestructive)
Pitfall: Array-Like Objects
Best Practices: Iterating over Arrays
19. Regular Expressions
Regular Expression Syntax
Unicode and Regular Expressions
Creating a Regular Expression
RegExp.prototype.test: Is There a Match?
String.prototype.search: At What Index Is There a Match?
RegExp.prototype.exec: Capture Groups
String.prototype.match: Capture Groups or Return All Matching Substrings
String.prototype.replace: Search and Replace
Problems with the Flag/g
Tips and Tricks
Regular Expression Cheat Sheet
20. Dates
The Date Constructor
Date Constructor Methods
Date Prototype Methods
Date Time Formats
Time Values: Dates as Milliseconds Since 1970-01-01
21. Math
Math Properties
Numerical Functions
Trigonometric Functions
Other Functions
22. JSON
Background
JSON.stringify(value, replacer?, space?)
JSON.parse(text, reviver?)
Transforming Data via Node Visitors
23. Standard Global Variables
Constructors
Error Constructors
Nonconstructor Functions
Dynamically Evaluating JavaScript Code via eval0 and new Function()
The Console API
Namespaces and Special Values
24. Unicode and lavaScript
Unicode History
Important Unicode Concepts
Code Points
Unicode Encodings
JavaScript Source Code and Unicode
JavaScript Strings and Unicode
JavaScript Regular Expressions and Unicode
25. New in ECMAScript 5
New Features
Syntactic Changes
New Functionality in the Standard Library
Tips for Working with Legacy Browsers
Part Ⅳ. Tips, Tools, and Libraries
26. A Meta Code Style Guide
Existing Style Guides
General Tips
Commonly Accepted Best Practices
Controversial Rules
Conclusion
27. Language Mechanisms for Debugging
28. Subclassing Built-ins
Terminology
Obstacle 1: Instances with Internal Properties
Obstacle 2: A Constructor That Can't Be Called as a Function
Another Solution: Delegation
29. JSDoc: Generating API Documentation
The Basics of JSDoc
Basic Tags
Documenting Functions and Methods
Inline Type Information ("Inline Doc Comments")
Documenting Variables, Parameters, and Instance Properties
Documenting Classes
Other Useful Tags
30. Libraries
Shims Versus Polyfills
Four Language Libraries
The ECMAScript Internationalization API
Directories for JavaScript Resources
31. Module Systems and Package Managers
Module Systems
Package Managers
Quick and Dirty Modules
32. More Tools
33. What to Do Next
Index
展开全部

JavaScript新语-(影印版) 节选

  《JavaScript新语(影印版)》:  The preceding construct is either a named function expression or a function dec-laration. The former produces a function, the latter creates a variable and assigns afunction to it (details on both kinds of function definition: "Defining Functions"on page 166).  In order to prevent ambiguity during parsing, JavaScript does not let you use objectliterals and function expressions as statements. That is, expression statements must notstart with:  A curly brace  The keyword function  If an expression starts with either of those tokens, it can only appear in an expressioncontext. You can comply with that requirement by, for example, putting parenthesesaround the expression. Next, we'll look at two examples where that is necessary.Evaluating an object literal via evalOeval. parses its argument in statement context. You have to put parentheses around anobject literal if you want eval. to return an obiect.  ……

JavaScript新语-(影印版) 作者简介

Axel Rauschmayer士专长于JavaScript和web开发。他在2ality.com上撰写博客,是Ecmanauten公司的培训师,《JavaScript Weekly》周刊的编辑,并且管理着MunichJS用户组。Axel从1985年就开始编程,从1995开始开发web应用程序。

商品评论(0条)
暂无评论……
书友推荐
编辑推荐
返回顶部
中图网
在线客服