Speaking JavaScript. An In-Depth Guide for Programmers
- Autor:
- Axel Rauschmayer
- Ocena:
- Bądź pierwszym, który oceni tę książkę
- Stron:
- 460
- Dostępne formaty:
-
ePubMobi
Opis ebooka: Speaking JavaScript. An In-Depth Guide for Programmers
Like it or not, JavaScript is everywhere these days—from browser to server to mobile—and now you, too, need to learn the language or dive deeper than you have. This concise book guides you into and through JavaScript, written by a veteran programmer who once found himself in the same position.
Speaking JavaScript helps you approach the language with four standalone sections. First, a quick-start guide teaches you just enough of the language to help you be productive right away. More experienced JavaScript programmers will find a complete and easy-to-read reference that covers each language feature in depth. Complete contents include:
- JavaScript quick start: Familiar with object-oriented programming? This part helps you learn JavaScript quickly and properly.
- JavaScript in depth: Learn details of ECMAScript 5, from syntax, variables, functions, and object-oriented programming to regular expressions and JSON with lots of examples. Pick a topic and jump in.
- Background: Understand JavaScript’s history and its relationship with other programming languages.
- Tips, tools, and libraries: Survey existing style guides, best practices, advanced techniques, module systems, package managers, build tools, and learning resources.
Wybrane bestsellery
-
What’s next for JavaScript? Its phenomenal rise from a simple client-side scripting tool to a versatile and flexible programming language exceeded everyone’s expectations. Now, hopes and expectations for JavaScript’s future are considerable.In this insightful report, Dr. Axel Ra...
-
To dziewiąte wydanie znakomitego podręcznika programowania dla początkujących, starannie zaktualizowane i uzupełnione o informacje dotyczące Java Platform, Standard Edition 17. Książka rozpoczyna się od solidnej dawki wiedzy o kompilacji i uruchamianiu programu w Javie, słowach kluczowych i istot...(83.85 zł najniższa cena z 30 dni)
90.30 zł
129.00 zł(-30%) -
Dzięki tej książce zrozumiesz bazowe koncepcje programowania funkcyjnego i przekonasz się, że możesz włączać je do kodu bez rezygnacji z paradygmatu obiektowego. Dowiesz się również, kiedy w swojej codziennej pracy używać takich opcji jak niemutowalność i funkcje czyste i dlaczego warto to robić....
Java. Podejście funkcyjne. Rozszerzanie obiektowego kodu Javy o zasady programowania funkcyjnego Java. Podejście funkcyjne. Rozszerzanie obiektowego kodu Javy o zasady programowania funkcyjnego
(56.55 zł najniższa cena z 30 dni)60.90 zł
87.00 zł(-30%) -
W tej książce omówiono ponad 20 najprzydatniejszych wzorców projektowych, dzięki którym tworzone aplikacje internetowe będą łatwe w późniejszej obsłudze technicznej i w trakcie skalowania. Poza wzorcami projektowymi przedstawiono wzorce generowania i wydajności działania, których znaczenie dla uż...
Wzorce projektowe w JavaScripcie. Przewodnik dla programistów JavaScriptu i Reacta. Wydanie II Wzorce projektowe w JavaScripcie. Przewodnik dla programistów JavaScriptu i Reacta. Wydanie II
(44.85 zł najniższa cena z 30 dni)48.30 zł
69.00 zł(-30%) -
Ta książka szczególnie przyda się osobom, które rozpoczynają pracę z Angularem. Dzięki niej szybko zaczniesz tworzyć aplikacje z wykorzystaniem wiersza poleceń (CLI), pisać testy jednostkowe i używać stylów zgodnych ze standardem Material Design. Dowiesz się również, jak wdrażać aplikacje w środo...
Poznaj Angular. Rzeczowy przewodnik po tworzeniu aplikacji webowych z użyciem frameworku Angular 15. Wydanie IV Poznaj Angular. Rzeczowy przewodnik po tworzeniu aplikacji webowych z użyciem frameworku Angular 15. Wydanie IV
(57.84 zł najniższa cena z 30 dni)62.30 zł
89.00 zł(-30%) -
Oto kolejne wydanie zwięzłego podręcznika dla programistów Javy, który ma ułatwić maksymalne wykorzystanie technologii tego języka w wersji 17. Treść została skrupulatnie przejrzana i uzupełniona o materiał dotyczący nowości w obiektowym modelu Javy. Pierwsza część książki obejmuje wprowadzenie d...(57.84 zł najniższa cena z 30 dni)
62.30 zł
89.00 zł(-30%) -
Oto zaktualizowane i uzupełnione wydanie zwięzłego wprowadzenia do Javy SE 17, przeznaczonego dla profesjonalnych programistów Javy. Przedstawiono w nim wszystkie istotne zagadnienia, łącznie z takimi koncepcjami jak wyrażenia lambda i strumienie, nowoczesnymi konstrukcjami, jak rekordy i klasy z...
Java. Przewodnik doświadczonego programisty. Wydanie III Java. Przewodnik doświadczonego programisty. Wydanie III
(57.84 zł najniższa cena z 30 dni)62.30 zł
89.00 zł(-30%) -
Mimo intensywnego rozwoju mediów społecznościowych, a co za tym idzie – nowego modelu kontaktu z klientami i „followersami”, zapotrzebowanie na profesjonalne, nowoczesne strony WWW nie maleje. Firmy i osoby prywatne wciąż poszukują twórców witryn w pełni responsywnych i maksymal...
Bootstrap. Kurs video. Tworzenie interaktywnych i responsywnych stron internetowych Bootstrap. Kurs video. Tworzenie interaktywnych i responsywnych stron internetowych
(67.60 zł najniższa cena z 30 dni)84.50 zł
169.00 zł(-50%) -
Oto dwunaste wydanie wyczerpującego kompendium, w pełni zaktualizowane, uzupełnione o nowości wprowadzone w Java SE 17. Opisano w nim cały język Java: jego składnię, słowa kluczowe i najistotniejsze zasady programowania. Znalazły się tu także informacje dotyczące biblioteki Java API, takie jak op...(129.35 zł najniższa cena z 30 dni)
139.30 zł
199.00 zł(-30%) -
Dzięki temu przyjaznemu przewodnikowi poznasz kluczowe koncepcje programistyczne i operacje obiektowego modelu dokumentu. Nauczysz się też pisać kod działający asynchronicznie i współbieżnie. Poszczególne zagadnienia zostały zilustrowane przykładowymi fragmentami kodu i prostymi projektami ―...
JavaScript od pierwszej linii kodu. Błyskawiczna nauka pisania gier, stron WWW i aplikacji internetowych JavaScript od pierwszej linii kodu. Błyskawiczna nauka pisania gier, stron WWW i aplikacji internetowych
(64.35 zł najniższa cena z 30 dni)69.30 zł
99.00 zł(-30%)
Ebooka "Speaking JavaScript. An In-Depth Guide for Programmers" przeczytasz na:
-
czytnikach Inkbook, Kindle, Pocketbook, Onyx Boox i innych
-
systemach Windows, MacOS i innych
-
systemach Windows, Android, iOS, HarmonyOS
-
na dowolnych urządzeniach i aplikacjach obsługujących formaty: PDF, EPub, Mobi
Masz pytania? Zajrzyj do zakładki Pomoc »
Audiobooka "Speaking JavaScript. An In-Depth Guide for Programmers" posłuchasz:
-
w aplikacji Ebookpoint na Android, iOS, HarmonyOs
-
na systemach Windows, MacOS i innych
-
na dowolnych urządzeniach i aplikacjach obsługujących format MP3 (pliki spakowane w ZIP)
Masz pytania? Zajrzyj do zakładki Pomoc »
Kurs Video "Speaking JavaScript. An In-Depth Guide for Programmers" zobaczysz:
-
w aplikacjach Ebookpoint i Videopoint na Android, iOS, HarmonyOs
-
na systemach Windows, MacOS i innych z dostępem do najnowszej wersji Twojej przeglądarki internetowej
Szczegóły ebooka
- ISBN Ebooka:
- 978-14-493-6499-1, 9781449364991
- Data wydania ebooka:
- 2014-02-25 Data wydania ebooka często jest dniem wprowadzenia tytułu do sprzedaży i może nie być równoznaczna z datą wydania książki papierowej. Dodatkowe informacje możesz znaleźć w darmowym fragmencie. Jeśli masz wątpliwości skontaktuj się z nami sklep@ebookpoint.pl.
- Język publikacji:
- angielski
- Rozmiar pliku ePub:
- 2.6MB
- Rozmiar pliku Mobi:
- 2.6MB
Spis treści ebooka
- Speaking JavaScript
- Dedication
- Preface
- What You Need to Know About This Book
- Tips for Reading This Book
- The Four Parts of This Book
- JavaScript Command Lines
- Notational Conventions
- Describing syntax
- Referring to methods
- Command-line interaction
- Tips, notes, and warnings
- Quickly Finding Documentation
- Safari Books Online
- How to Contact Us
- Acknowledgments
- Preparing for JavaScript
- Help with JavaScript
- Reviewers
- I. JavaScript Quick Start
- 1. Basic JavaScript
- Background
- JavaScript Versus ECMAScript
- Influences and Nature of the Language
- Background
- Syntax
- An Overview of the Syntax
- Statements Versus Expressions
- Semicolons
- Comments
- 1. Basic JavaScript
- Variables and Assignment
- Assignment
- Compound Assignment Operators
- Identifiers and Variable Names
- Values
- Primitive Values Versus Objects
- Primitive Values
- Objects
- undefined and null
- Checking for undefined or null
- Categorizing Values Using typeof and instanceof
- Booleans
- Truthy and Falsy
- Binary Logical Operators
- Equality Operators
- Numbers
- Operators
- Strings
- String Operators
- String Methods
- Statements
- Conditionals
- Loops
- Functions
- Function Declarations Are Hoisted
- The Special Variable arguments
- Too Many or Too Few Arguments
- Optional Parameters
- Enforcing an Arity
- Converting arguments to an Array
- Exception Handling
- Strict Mode
- Variable Scoping and Closures
- Variables Are Function-Scoped
- Variables Are Hoisted
- Closures
- The IIFE Pattern: Introducing a New Scope
- IIFE use case: inadvertent sharing via closures
- Objects and Constructors
- Single Objects
- Arbitrary Property Keys
- Extracting Methods
- Functions Inside a Method
- Constructors: Factories for Objects
- Arrays
- Array Literals
- Array Methods
- Iterating over Arrays
- Regular Expressions
- Method test(): Is There a Match?
- Method exec(): Match and Capture Groups
- Method replace(): Search and Replace
- Math
- Other Functionality of the Standard Library
- II. Background
- 2. Why JavaScript?
- Is JavaScript Freely Available?
- Is JavaScript Elegant?
- Is JavaScript Useful?
- Graphical User Interfaces
- Other Technologies Complementing JavaScript
- Does JavaScript Have Good Tools?
- Is JavaScript Fast Enough?
- Is JavaScript Widely Used?
- Does JavaScript Have a Future?
- Conclusion
- 2. Why JavaScript?
- 3. The Nature of JavaScript
- Quirks and Unorthodox Features
- Elegant Parts
- Influences
- 4. How JavaScript Was Created
- 5. Standardization: ECMAScript
- 6. Historical JavaScript Milestones
- III. JavaScript in Depth
- 7. JavaScripts Syntax
- An Overview of the Syntax
- Comments
- Expressions Versus Statements
- Expressions
- Statements
- Conditional statement versus conditional expressions
- Using ambiguous expressions as statements
- Evaluating an object literal via eval()
- Immediately invoking a function expression
- Control Flow Statements and Blocks
- Rules for Using Semicolons
- No Semicolon After a Statement Ending with a Block
- The Empty Statement
- Automatic Semicolon Insertion
- Example: ASI via illegal token
- Example: ASI via closing brace
- Pitfall: ASI can unexpectedly break up statements
- Pitfall: ASI might unexpectedly not be triggered
- 7. JavaScripts Syntax
- Legal Identifiers
- Invoking Methods on Number Literals
- Strict Mode
- Switching on Strict Mode
- Strict Mode: Recommended, with Caveats
- Variables Must Be Declared in Strict Mode
- Functions in Strict Mode
- Functions must be declared at the top level of a scope
- Stricter rules for function parameters
- The arguments objects has fewer properties
- this is undefined in nonmethod functions
- Setting and Deleting Immutable Properties Fails with an Exception in Strict Mode
- Unqualified Identifiers Cant Be Deleted in Strict Mode
- eval() Is Cleaner in Strict Mode
- Features That Are Forbidden in Strict Mode
- 8. Values
- JavaScripts Type System
- JavaScripts Types
- Static Versus Dynamic
- Static Typing Versus Dynamic Typing
- Static Type Checking Versus Dynamic Type Checking
- Coercion
- JavaScripts Type System
- Primitive Values Versus Objects
- Primitive Values
- Objects
- undefined and null
- Occurrences of undefined and null
- Occurrences of undefined
- Occurrences of null
- Occurrences of undefined and null
- Checking for undefined or null
- Checking for null
- Checking for undefined
- Checking for either undefined or null
- The History of undefined and null
- Changing undefined
- Wrapper Objects for Primitives
- Wrapper Objects Are Different from Primitives
- Wrapping and Unwrapping Primitives
- Primitives Borrow Their Methods from Wrappers
- Type Coercion
- Type Coercion Can Hide Bugs
- Functions for Converting to Boolean, Number, String, and Object
- Algorithm: ToPrimitive()Converting a Value to a Primitive
- Examples: ToPrimitive() in action
- 9. Operators
- Operators and Objects
- Assignment Operators
- Compound Assignment Operators
- Equality Operators: === Versus ==
- Strict Equality (===, !==)
- Pitfall: NaN
- Strict inequality (!==)
- Strict Equality (===, !==)
- Normal (Lenient) Equality (==, !=)
- Lenient inequality (!=)
- Pitfall: lenient equality is different from conversion to boolean
- Pitfall: lenient equality and strings
- Pitfall: lenient equality and objects
- There Are No Valid Use Cases for ==
- Use case: checking for undefined or null
- Use case: working with numbers in strings
- Use case: comparing wrapper instances with primitives
- Ordering Operators
- The Algorithm
- The Plus Operator (+)
- The Algorithm
- Operators for Booleans and Numbers
- Special Operators
- The Conditional Operator ( ? : )
- The Comma Operator
- The void Operator
- What is void used for?
- Why does JavaScript have a void operator?
- Categorizing Values via typeof and instanceof
- typeof: Categorizing Primitives
- Pitfall: typeof null
- The history of typeof null
- Checking whether a variable exists
- typeof: Categorizing Primitives
- instanceof: Checking Whether an Object Is an Instance of a Given Constructor
- Object Operators
- 10. Booleans
- Converting to Boolean
- Manually Converting to Boolean
- Truthy and Falsy Values
- Pitfall: all objects are truthy
- History: Why are objects always truthy?
- Converting to Boolean
- Logical Operators
- Binary Logical Operators: And (&&) and Or (||)
- Logical And (&&)
- Logical Or (||)
- Pattern: providing a default value
- Example 1: a default for a parameter
- Example 2: a default for a property
- Example 3: a default for the result of a function
- Logical Not (!)
- Equality Operators, Ordering Operators
- The Function Boolean
- 11. Numbers
- Number Literals
- Exponent
- Invoking Methods on Literals
- Number Literals
- Converting to Number
- Manually Converting to Number
- parseFloat()
- Special Number Values
- NaN
- Pitfall: checking whether a value is NaN
- NaN
- Infinity
- Error: a numbers magnitude is too large
- Error: division by zero
- Computing with Infinity
- Checking for Infinity
- Two Zeros
- Best practice: pretend theres only one zero
- Distinguishing the two zeros
- The Internal Representation of Numbers
- Special Exponents
- Handling Rounding Errors
- Integers in JavaScript
- Ranges of Integers
- Representing Integers as Floating-Point Numbers
- Best practice
- Safe Integers
- Definitions in ECMAScript 6
- Safe results of arithmetic computations
- Converting to Integer
- Integers via Math.floor(), Math.ceil(), and Math.round()
- Integers via the Custom Function ToInteger()
- 32-bit Integers via Bitwise Operators
- Bitwise Or (|)
- Shift operators
- Should I use bitwise operators to coerce to integer?
- Integers via parseInt()
- The radix
- Explanation
- Summary
- Arithmetic Operators
- Bitwise Operators
- Background Knowledge
- Binary complements
- Signed 32-bit integers
- Inputting and outputting binary numbers
- Background Knowledge
- Bitwise Not Operator
- Binary Bitwise Operators
- Bitwise Shift Operators
- The Function Number
- Number Constructor Properties
- Number Prototype Methods
- Number.prototype.toFixed(fractionDigits?)
- Number.prototype.toPrecision(precision?)
- Number.prototype.toString(radix?)
- Decimal exponential notation
- Number.prototype.toExponential(fractionDigits?)
- Functions for Numbers
- Sources for This Chapter
- 12. Strings
- String Literals
- Escaping in String Literals
- Character Access
- Converting to String
- Manually Converting to String
- Pitfall: conversion is not invertible
- Manually Converting to String
- Comparing Strings
- Concatenating Strings
- Concatenation: The Plus (+) Operator
- Concatenation: Joining an Array of String Fragments
- The Function String
- String Constructor Method
- String Instance Property length
- String Prototype Methods
- Extract Substrings
- Transform
- Search and Compare
- Test, Match, and Replace with Regular Expressions
- 13. Statements
- Declaring and Assigning Variables
- The Bodies of Loops and Conditionals
- Loops
- Mechanisms to Be Used with Loops
- while
- do-while
- for
- for-in
- Best practice: dont use for-in for arrays
- Best practice: be careful with for-in for objects
- for each-in
- Conditionals
- if-then-else
- Chaining if statements
- Pitfall: dangling else
- if-then-else
- switch
- The with Statement
- Syntax and Semantics
- The with Statement Is Deprecated
- Techniques for avoiding the with statement
- The Rationale for the Deprecation
- The debugger Statement
- 14. Exception Handling
- What Is Exception Handling?
- Exception Handling in JavaScript
- throw
- try-catch-finally
- Examples
- Error Constructors
- Stack Traces
- Implementing Your Own Error Constructor
- 15. Functions
- The Three Roles of Functions in JavaScript
- Terminology: Parameter Versus Argument
- Defining Functions
- Function Expressions
- Named function expressions
- Function Expressions
- Function Declarations
- The Function Constructor
- 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()
- func.apply(thisValue, argArray)
- func.bind(thisValue, arg1, ..., argN)
- Handling Missing or Extra Parameters
- All Parameters by Index: The Special Variable arguments
- Deprecated features of arguments
- All Parameters by Index: The Special Variable arguments
- Mandatory Parameters, Enforcing a Minimum Arity
- Optional Parameters
- Simulating Pass-by-Reference Parameters
- Pitfall: Unexpected Optional Parameters
- Named Parameters
- Named Parameters as Descriptions
- Optional Named Parameters
- Simulating Named Parameters in JavaScript
- 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
- IIFE Variation: Prefix Operators
- IIFE Variation: Already Inside Expression Context
- IIFE Variation: An IIFE with Parameters
- IIFE Applications
- Global Variables
- Best Practice: Avoid Creating Global Variables
- Module Systems Lead to Fewer Globals
- The Global Object
- Cross-Platform Considerations
- Use Cases for window
- Use case: marking global variables
- Use case: built-ins
- Use case: style checkers
- Use case: checking whether a global variable exists
- Use case: creating things in global scope
- Environments: Managing Variables
- Closures: Functions Stay Connected to Their Birth Scopes
- Handling Closures via Environments
- Pitfall: Inadvertently Sharing an Environment
- 17. Objects and Inheritance
- Layer 1: Single Objects
- Kinds of Properties
- Object Literals
- Dot Operator (.): Accessing Properties via Fixed Keys
- Getting properties
- Calling methods
- Setting properties
- Deleting properties
- The return value of delete
- Unusual Property Keys
- Bracket Operator ([]): Accessing Properties via Computed Keys
- Getting properties via the bracket operator
- Calling methods via the bracket operator
- Setting properties via the bracket operator
- Deleting properties via the bracket operator
- Layer 1: Single Objects
- Converting Any Value to an Object
- this as an Implicit Parameter of Functions and Methods
- Calling Functions While Setting this: call(), apply(), and bind()
- Function.prototype.call(thisValue, arg1?, arg2?, ...)
- Function.prototype.apply(thisValue, argArray)
- Function.prototype.bind(thisValue, arg1?, ..., argN?)
- Calling Functions While Setting this: call(), apply(), and bind()
- apply() for Constructors
- Manually simulating an apply() for constructors
- A library method
- An alternative approach
- Pitfall: Losing this When Extracting a Method
- How to get a warning
- How to properly extract a method
- Callbacks and extracted methods
- Pitfall: Functions Inside Methods Shadow this
- Workaround 1: that = this
- Workaround 2: bind()
- Workaround 3: a thisValue for forEach()
- Layer 2: The Prototype Relationship Between Objects
- Inheritance
- Overriding
- Sharing Data Between Objects via a Prototype
- Getting and Setting the Prototype
- Creating a new object with a given prototype
- Reading the prototype of an object
- Checking whether one object a prototype of another one
- Finding the object where a property is defined
- The Special Property __proto__
- Setting and Deleting Affects Only Own Properties
- Setting a property
- Deleting an inherited property
- Changing properties anywhere in the prototype chain
- Iteration and Detection of Properties
- Listing Own Property Keys
- Listing All Property Keys
- Checking Whether a Property Exists
- Examples
- The effects of enumerability
- The effects of inheritance
- Computing the number of own properties of an object
- Best Practices: Iterating over Own Properties
- Accessors (Getters and Setters)
- Defining Accessors via an Object Literal
- Defining Accessors via Property Descriptors
- Accessors and Inheritance
- Property Attributes and Property Descriptors
- Property Attributes
- Default values
- Property Attributes
- Property Descriptors
- Getting and Defining Properties via Descriptors
- Copying an Object
- Properties: Definition Versus Assignment
- Inherited Read-Only Properties Cant Be Assigned To
- Enumerability: Best Practices
- Protecting Objects
- Preventing Extensions
- Sealing
- Freezing
- Pitfall: Protection Is Shallow
- Layer 3: ConstructorsFactories for Instances
- The new Operator Implemented in JavaScript
- Terminology: The Two Prototypes
- The constructor Property of Instances
- Use cases for the constructor property
- Best practice
- The instanceof Operator
- Pitfall: objects that are not instances of Object
- Pitfall: crossing realms (frames or windows)
- Tips for Implementing Constructors
- Protection against forgetting new: strict mode
- Returning arbitrary objects from a constructor
- Data in Prototype Properties
- Avoid Prototype Properties with Initial Values for Instance Properties
- Best practice: dont share default values
- Creating instance properties on demand
- Avoid Prototype Properties with Initial Values for Instance Properties
- Avoid Nonpolymorphic Prototype Properties
- Polymorphic Prototype Properties
- Keeping Data Private
- Private Data in the Environment of a Constructor (Crockford Privacy Pattern)
- Public properties
- Private values
- Privileged methods
- An example
- The pros and cons of the Crockford privacy pattern
- Private Data in the Environment of a Constructor (Crockford Privacy Pattern)
- Private Data in Properties with Marked Keys
- Private Data in Properties with Reified Keys
- Keeping Global Data Private via IIFEs
- Attaching private global data to a singleton object
- Keeping global data private to all of a constructor
- Attaching global data to a method
- Layer 4: Inheritance Between Constructors
- Inheriting Instance Properties
- Inheriting Prototype Properties
- Ensuring That instanceof Works
- Overriding a Method
- Making a Supercall
- Avoiding Hardcoding the Name of the Superconstructor
- Example: Constructor Inheritance in Use
- Example: The Inheritance Hierarchy of Built-in Constructors
- Antipattern: The Prototype Is an Instance of the Superconstructor
- Methods of All Objects
- Conversion to Primitive
- Object.prototype.toLocaleString()
- Prototypal Inheritance and Properties
- Generic Methods: Borrowing Methods from Prototypes
- Accessing Object.prototype and Array.prototype via Literals
- Examples of Calling Methods Generically
- Array-Like Objects and Generic Methods
- Patterns for working with array-like objects
- A List of All Generic Methods
- Pitfalls: Using an Object as a Map
- Pitfall 1: Inheritance Affects Reading Properties
- Checking whether a property exists
- Collecting property keys
- Getting a property value
- Pitfall 1: Inheritance Affects Reading Properties
- Pitfall 2: Overriding Affects Invoking Methods
- Pitfall 3: The Special Property __proto__
- The dict Pattern: Objects Without Prototypes Are Better Maps
- Normal objects
- Prototype-less objects
- Recommendation
- Best Practices
- Cheat Sheet: Working with Objects
- 18. Arrays
- Overview
- Arrays Are Maps, Not Tuples
- Arrays Can Also Have Properties
- Overview
- Creating Arrays
- The Array Constructor
- Creating an empty array with a given length
- Initializing an array with elements (avoid!)
- The Array Constructor
- Multidimensional Arrays
- Array Indices
- The in Operator and Indices
- Deleting Array Elements
- Array Indices in Detail
- length
- Manually Increasing the Length of an Array
- Decreasing the Length of an Array
- Clearing an array
- Clearing shared arrays
- The Maximum Length
- Holes in Arrays
- Creating Holes
- Sparse Arrays Versus Dense Arrays
- Which Operations Ignore Holes, and Which Consider Them?
- Array iteration methods
- Other array methods
- The for-in loop
- Function.prototype.apply()
- Removing Holes from Arrays
- Array Constructor Method
- Array Prototype Methods
- Adding and Removing Elements (Destructive)
- Sorting and Reversing Elements (Destructive)
- Comparing Numbers
- Comparing Strings
- Comparing Objects
- Concatenating, Slicing, Joining (Nondestructive)
- Searching for Values (Nondestructive)
- Iteration (Nondestructive)
- Examination Methods
- Transformation Methods
- Reduction Methods
- Pitfall: Array-Like Objects
- Best Practices: Iterating over Arrays
- 19. Regular Expressions
- Regular Expression Syntax
- Atoms: General
- Atoms: Character Classes
- Atoms: Groups
- Quantifiers
- Assertions
- Disjunction
- Regular Expression Syntax
- Unicode and Regular Expressions
- Creating a Regular Expression
- Literal Versus Constructor
- Flags
- Instance Properties of Regular Expressions
- Examples of Creating Regular Expressions
- RegExp.prototype.test: Is There a Match?
- String.prototype.search: At What Index Is There a Match?
- RegExp.prototype.exec: Capture Groups
- First Match (Flag /g Not Set)
- All Matches (Flag /g Set)
- String.prototype.match: Capture Groups or Return All Matching Substrings
- String.prototype.replace: Search and Replace
- Replacement Is a String
- Replacement Is a Function
- Problems with the Flag /g
- Tips and Tricks
- Quoting Text
- Pitfall: Without an Assertion (e.g., ^, $), a Regular Expression Is Found Anywhere
- Matching Everything or Nothing
- Matching everything
- Matching nothing
- Manually Implementing Lookbehind
- Regular Expression Cheat Sheet
- 20. Dates
- The Date Constructor
- Date Constructor Methods
- Date Prototype Methods
- Time Unit Getters and Setters
- Various Getters and Setters
- Convert a Date to a String
- Date Time Formats
- Date Formats (No Time)
- Time Formats (No Date)
- Date Time Formats
- Time Values: Dates as Milliseconds Since 1970-01-01
- Converting a Date to a Number
- 21. Math
- Math Properties
- Numerical Functions
- Trigonometric Functions
- Other Functions
- 22. JSON
- Background
- Data Format
- History
- Grammar
- Background
- JSON.stringify(value, replacer?, space?)
- Data Ignored by JSON.stringify()
- The toJSON() Method
- JSON.parse(text, reviver?)
- Transforming Data via Node Visitors
- JSON.stringify()
- JSON.parse()
- 23. Standard Global Variables
- Constructors
- Error Constructors
- Nonconstructor Functions
- Encoding and Decoding Text
- Categorizing and Parsing Numbers
- Dynamically Evaluating JavaScript Code via eval() and new Function()
- Evaluating Code Using eval()
- Use eval() in strict mode
- Indirect eval() evaluates in global scope
- Evaluating Code Using eval()
- Evaluating Code Using new Function()
- eval() Versus new Function()
- Best Practices
- Legitimate use cases
- Conclusion
- The Console API
- How Standardized Is the Console API Across Engines?
- Simple Logging
- Checking and Counting
- Formatted Logging
- Profiling and Timing
- Namespaces and Special Values
- 24. Unicode and JavaScript
- Unicode History
- Important Unicode Concepts
- Code Points
- Unicode Encodings
- JavaScript Source Code and Unicode
- Source Code Internally
- Source Code Externally
- JavaScript Strings and Unicode
- Escape Sequences
- Refering to Astral Plane Characters via Escapes
- Counting Characters
- Unicode Normalization
- JavaScript Regular Expressions and Unicode
- Matching Any Code Unit and Any Code Point
- Libraries
- Recommended Reading and Chapter Sources
- 25. New in ECMAScript 5
- New Features
- Syntactic Changes
- New Functionality in the Standard Library
- Metaprogramming
- New Methods
- JSON
- Tips for Working with Legacy Browsers
- IV. Tips, Tools, and Libraries
- 26. A Meta Code Style Guide
- Existing Style Guides
- General Tips
- Code Should Be Consistent
- Code Should Be Easy to Understand
- Commonly Accepted Best Practices
- Brace Styles
- Allman style
- 1TBS (One True Brace Style)
- JavaScript
- Brace Styles
- Prefer Literals to Constructors
- Dont Be Clever
- Conditional operator
- Abbreviating if statements
- Increment operator
- Checking for undefined
- Converting a number to an integer
- 26. A Meta Code Style Guide
- Acceptable Cleverness
- Default values
- Generic methods
- ECMAScript 5: trailing commas
- ECMAScript 5: reserved words
- Controversial Rules
- Syntax
- Variables
- Object Orientation
- Miscellaneous
- Conclusion
- 27. Language Mechanisms for Debugging
- 28. Subclassing Built-ins
- Terminology
- Obstacle 1: Instances with Internal Properties
- Workaround for Obstacle 1
- Caveats
- Obstacle 2: A Constructor That Cant Be Called as a Function
- Workaround for Obstacle 2
- Another Solution: Delegation
- 29. JSDoc: Generating API Documentation
- The Basics of JSDoc
- Syntax
- Naming Types
- The Basics of JSDoc
- Basic Tags
- Documenting Functions and Methods
- Inline Type Information (Inline Doc Comments)
- Documenting Variables, Parameters, and Instance Properties
- Documenting Classes
- Defining a Class via a Constructor Function
- Defining a Class via an Object Literal
- Defining a Class via an Object Literal with an @constructs Method
- Subclassing
- Other Useful Tags
- 30. Libraries
- Shims Versus Polyfills
- Four Language Libraries
- The ECMAScript Internationalization API
- The ECMAScript Internationalization API, Edition 1
- What Kind of Standard Is It?
- When Can I Use It?
- Further Reading
- 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
- About the Author
- Colophon
- Copyright
O'Reilly Media - inne książki
-
Software as a service (SaaS) is on the path to becoming the de facto model for building, delivering, and operating software solutions. Adopting a multi-tenant SaaS model requires builders to take on a broad range of new architecture, implementation, and operational challenges. How data is partiti...(237.15 zł najniższa cena z 30 dni)
245.65 zł
289.00 zł(-15%) -
Great engineers don't necessarily make great leaders—at least, not without a lot of work. Finding your path to becoming a strong leader is often fraught with challenges. It's not easy to figure out how to be strategic, successful, and considerate while also being firm. Whether you're on the...(126.65 zł najniższa cena z 30 dni)
126.65 zł
149.00 zł(-15%) -
Data science happens in code. The ability to write reproducible, robust, scaleable code is key to a data science project's success—and is absolutely essential for those working with production code. This practical book bridges the gap between data science and software engineering,and clearl...(211.65 zł najniższa cena z 30 dni)
211.65 zł
249.00 zł(-15%) -
With the massive adoption of microservices, operators and developers face far more complexity in their applications today. Service meshes can help you manage this problem by providing a unified control plane to secure, manage, and monitor your entire network. This practical guide shows you how th...(203.15 zł najniższa cena z 30 dni)
203.15 zł
239.00 zł(-15%) -
Get practical advice on how to leverage AI development tools for all stages of code creation, including requirements, planning, design, coding, debugging, testing, and documentation. With this book, beginners and experienced developers alike will learn how to use a wide range of tools, from gener...(164.25 zł najniższa cena z 30 dni)
186.15 zł
219.00 zł(-15%) -
Rust's popularity is growing, due in part to features like memory safety, type safety, and thread safety. But these same elements can also make learning Rust a challenge, even for experienced programmers. This practical guide helps you make the transition to writing idiomatic Rust—while als...(164.25 zł najniższa cena z 30 dni)
186.15 zł
219.00 zł(-15%) -
Advance your Power BI skills by adding AI to your repertoire at a practice level. With this practical book, business-oriented software engineers and developers will learn the terminologies, practices, and strategy necessary to successfully incorporate AI into your business intelligence estate. Je...(211.65 zł najniższa cena z 30 dni)
211.65 zł
249.00 zł(-15%) -
Microservices can be a very effective approach for delivering value to your organization and to your customers. If you get them right, microservices help you to move fast by making changes to small parts of your system hundreds of times a day. But if you get them wrong, microservices will just ma...(203.15 zł najniższa cena z 30 dni)
203.15 zł
239.00 zł(-15%) -
JavaScript gives web developers great power to create rich interactive browser experiences, and much of that power is provided by the browser itself. Modern web APIs enable web-based applications to come to life like never before, supporting actions that once required browser plug-ins. Some are s...(186.15 zł najniższa cena z 30 dni)
186.15 zł
219.00 zł(-15%) -
How will software development and operations have to change to meet the sustainability and green needs of the planet? And what does that imply for development organizations? In this eye-opening book, sustainable software advocates Anne Currie, Sarah Hsu, and Sara Bergman provide a unique overview...(169.14 zł najniższa cena z 30 dni)
169.14 zł
199.00 zł(-15%)
Dzieki opcji "Druk na żądanie" do sprzedaży wracają tytuły Grupy Helion, które cieszyły sie dużym zainteresowaniem, a których nakład został wyprzedany.
Dla naszych Czytelników wydrukowaliśmy dodatkową pulę egzemplarzy w technice druku cyfrowego.
Co powinieneś wiedzieć o usłudze "Druk na żądanie":
- usługa obejmuje tylko widoczną poniżej listę tytułów, którą na bieżąco aktualizujemy;
- cena książki może być wyższa od początkowej ceny detalicznej, co jest spowodowane kosztami druku cyfrowego (wyższymi niż koszty tradycyjnego druku offsetowego). Obowiązująca cena jest zawsze podawana na stronie WWW książki;
- zawartość książki wraz z dodatkami (płyta CD, DVD) odpowiada jej pierwotnemu wydaniu i jest w pełni komplementarna;
- usługa nie obejmuje książek w kolorze.
Masz pytanie o konkretny tytuł? Napisz do nas: sklep[at]helion.pl.
Książka, którą chcesz zamówić pochodzi z końcówki nakładu. Oznacza to, że mogą się pojawić drobne defekty (otarcia, rysy, zagięcia).
Co powinieneś wiedzieć o usłudze "Końcówka nakładu":
- usługa obejmuje tylko książki oznaczone tagiem "Końcówka nakładu";
- wady o których mowa powyżej nie podlegają reklamacji;
Masz pytanie o konkretny tytuł? Napisz do nas: sklep[at]helion.pl.
Książka drukowana
Oceny i opinie klientów: Speaking JavaScript. An In-Depth Guide for Programmers Axel Rauschmayer (0) Weryfikacja opinii następuję na podstawie historii zamówień na koncie Użytkownika umieszczającego opinię. Użytkownik mógł otrzymać punkty za opublikowanie opinii uprawniające do uzyskania rabatu w ramach Programu Punktowego.