JavaScript Notes for Professionals book

    Amazing collection of free programming books

    收集中
    免費
    Amazing collection of free programming books

    The Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified

    Book created for educational purposes and is not affiliated with group(s), company(s) nor Stack Overflow. All trademarks belong to their respective company owners

    https://goalkicker.com/

    章節目錄

    1-1Content list
    1-2About
    1-3Chapter 1: Getting started with JavaScript
    1-4Section 1.1: Using console.log()
    1-5Section 1.2: Using the DOM API
    1-6Section 1.3: Using window.alert()
    1-7Section 1.4: Using window.prompt()
    1-8Section 1.5: Using window.confirm()
    1-9Section 1.6: Using the DOM API (with graphical text: Canvas, SVG, or image file)
    1-10Chapter 2: JavaScript Variables
    1-11Section 2.1: Defining a Variable
    1-12Section 2.2: Using a Variable
    1-13Section 2.3: Types of Variables
    1-14Section 2.4: Arrays and Objects
    1-15Chapter 3: Built-in Constants
    1-16Section 3.1: null
    1-17Section 3.2: Testing for NaN using isNaN()
    1-18Section 3.3: NaN
    1-19Section 3.4: undefined and null
    1-20Section 3.5: Infinity and -Infinity
    1-21Section 3.6: Number constants
    1-22Section 3.7: Operations that return NaN
    1-23Section 3.8: Math library functions that return NaN
    1-24Chapter 4: Comments
    1-25Section 4.1: Using Comments
    1-26Section 4.2: Using HTML comments in JavaScript (Bad practice)
    1-27Chapter 5: Console
    1-28Section 5.1: Measuring time - console.time()
    1-29Section 5.2: Formatting console output
    1-30Section 5.3: Printing to a browser's debugging console
    1-31Section 5.4: Including a stack trace when logging - console.trace()
    1-32Section 5.5: Tabulating values - console.table()
    1-33Section 5.6: Counting - console.count()
    1-34Section 5.7: Clearing the console - console.clear()
    1-35Section 5.8: Displaying objects and XML interactively - console.dir(), console.dirxml()
    1-36Section 5.9: Debugging with assertions - console.assert()
    1-37Chapter 6: Datatypes in JavaScript
    1-38Section 6.1: typeof
    1-39Section 6.2: Finding an object's class
    1-40Section 6.3: Getting object type by constructor name
    1-41Chapter 7: Strings
    1-42Section 7.1: Basic Info and String Concatenation
    1-43Section 7.2: Reverse String
    1-44Section 7.3: Comparing Strings Lexicographically
    1-45Section 7.4: Access character at index in string
    1-46Section 7.5: Escaping quotes
    1-47Section 7.6: Word Counter
    1-48Section 7.7: Trim whitespace
    1-49Section 7.8: Splitting a string into an array
    1-50Section 7.9: Strings are unicode
    1-51Section 7.10: Detecting a string
    1-52Section 7.11: Substrings with slice
    1-53Section 7.12: Character code
    1-54Section 7.13: String Representations of Numbers
    1-55Section 7.14: String Find and Replace Functions
    1-56Section 7.15: Find the index of a substring inside a string
    1-57Section 7.16: String to Upper Case
    1-58Section 7.17: String to Lower Case
    1-59Section 7.18: Repeat a String
    1-60Chapter 8: Date
    1-61Section 8.1: Create a new Date object
    1-62Section 8.2: Convert to a string format
    1-63Section 8.3: Creating a Date from UTC
    1-64Section 8.4: Formatting a JavaScript date
    1-65Section 8.5: Get the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC
    1-66Section 8.6: Get the current time and date
    1-67Section 8.7: Increment a Date Object
    1-68Section 8.8: Convert to JSON
    1-69Chapter 9: Date Comparison
    1-70Section 9.1: Comparing Date values
    1-71Section 9.2: Date Dierence Calculation
    1-72Chapter 10: Comparison Operations
    1-73Section 10.1: Abstract equality / inequality and type conversion
    1-74Section 10.2: NaN Property of the Global Object
    1-75Section 10.3: Short-circuiting in boolean operators
    1-76Section 10.4: Null and Undefined
    1-77Section 10.5: Abstract Equality (==)
    1-78Section 10.6: Logic Operators with Booleans
    1-79Section 10.7: Automatic Type Conversions
    1-80Section 10.8: Logic Operators with Non-boolean values (boolean coercion)
    1-81Section 10.9: Empty Array
    1-82Section 10.10: Equality comparison operations
    1-83Section 10.11: Relational operators (<, <=, >, >=)
    1-84Section 10.12: Inequality
    1-85Section 10.13: List of Comparison Operators
    1-86Section 10.14: Grouping multiple logic statements
    1-87Section 10.15: Bit fields to optimise comparison of multi state data
    1-88Chapter 11: Conditions
    1-89Section 11.1: Ternary operators
    1-90Section 11.2: Switch statement
    1-91Section 11.3: If / Else If / Else Control
    1-92Section 11.4: Strategy
    1-93Section 11.5: Using || and && short circuiting
    1-94Chapter 12: Arrays
    1-95Section 12.1: Converting Array-like Objects to Arrays
    1-96Section 12.2: Reducing values
    1-97Section 12.3: Mapping values
    1-98Section 12.4: Filtering Object Arrays
    1-99Section 12.5: Sorting Arrays
    1-100Section 12.6: Iteration
    1-101Section 12.7: Destructuring an array
    1-102Section 12.8: Removing duplicate elements
    1-103Section 12.9: Array comparison
    1-104Section 12.10: Reversing arrays
    1-105Section 12.11: Shallow cloning an array
    1-106Section 12.12: Concatenating Arrays
    1-107Section 12.13: Merge two array as key value pair
    1-108Section 12.14: Array spread / rest
    1-109Section 12.15: Filtering values
    1-110Section 12.16: Searching an Array
    1-111Section 12.17: Convert a String to an Array
    1-112Section 12.18: Removing items from an array
    1-113Section 12.19: Removing all elements
    1-114Section 12.20: Finding the minimum or maximum element
    1-115Section 12.21: Standard array initialization
    1-116Section 12.22: Joining array elements in a string
    1-117Section 12.23: Removing/Adding elements using splice()
    1-118Section 12.24: The entries() method
    1-119Section 12.25: Remove value from array
    1-120Section 12.26: Flattening Arrays
    1-121Section 12.27: Append / Prepend items to Array
    1-122Section 12.28: Object keys and values to array
    1-123Section 12.29: Logical connective of values
    1-124Section 12.30: Checking if an object is an Array
    1-125Section 12.31: Insert an item into an array at a specific index
    1-126Section 12.32: Sorting multidimensional array
    1-127Section 12.33: Test all array items for equality
    1-128Section 12.34: Copy part of an Array
    1-129Chapter 13: Objects
    1-130Section 13.1: Shallow cloning
    1-131Section 13.2: Object.freeze
    1-132Section 13.3: Object cloning
    1-133Section 13.4: Object properties iteration
    1-134Section 13.5: Object.assign
    1-135Section 13.6: Object rest/spread (...)
    1-136Section 13.7: Object.defineProperty
    1-137Section 13.8: Accesor properties (get and set)
    1-138Section 13.9: Dynamic / variable property names
    1-139Section 13.10: Arrays are Objects
    1-140Section 13.11: Object.seal
    1-141Section 13.12: Convert object's values to array
    1-142Section 13.13: Retrieving properties from an object
    1-143Section 13.14: Read-Only property
    1-144Section 13.15: Non enumerable property
    1-145Section 13.16: Lock property description
    1-146Section 13.17: Object.getOwnPropertyDescriptor
    1-147Section 13.18: Descriptors and Named Properties
    1-148Section 13.19: Object.keys
    1-149Section 13.20: Properties with special characters or reserved words
    1-150Section 13.21: Creating an Iterable object
    1-151Section 13.22: Iterating over Object entries - Object.entries()
    1-152Section 13.23: Object.values()
    1-153Chapter 14: Arithmetic (Math)
    1-154Section 14.1: Constants
    1-155Section 14.2: Remainder / Modulus (%)
    1-156Section 14.3: Rounding
    1-157Section 14.4: Trigonometry
    1-158Section 14.5: Bitwise operators
    1-159Section 14.6: Incrementing (++)
    1-160Section 14.7: Exponentiation (Math.pow() or **)
    1-161Section 14.8: Random Integers and Floats
    1-162Section 14.9: Addition (+)
    1-163Section 14.10: Little / Big endian for typed arrays when using bitwise operators
    1-164Section 14.11: Get Random Between Two Numbers
    1-165Section 14.12: Simulating events with dierent probabilities
    1-166Section 14.13: Subtraction (-)
    1-167Section 14.14: Multiplication (*)
    1-168Section 14.15: Getting maximum and minimum
    1-169Section 14.16: Restrict Number to Min/Max Range
    1-170Section 14.17: Ceiling and Floor
    1-171Section 14.18: Getting roots of a number
    1-172Section 14.19: Random with gaussian distribution
    1-173Section 14.20: Math.atan2 to find direction
    1-174Section 14.21: Sin & Cos to create a vector given direction & distance
    1-175Section 14.22: Math.hypot
    1-176Section 14.23: Periodic functions using Math.sin
    1-177Section 14.24: Division (/)
    1-178Section 14.25: Decrementing (--)
    1-179Chapter 15: Bitwise operators
    1-180Section 15.1: Bitwise operators
    1-181Section 15.2: Shift Operators
    1-182Chapter 16: Constructor functions
    1-183Section 16.1: Declaring a constructor function
    1-184Chapter 17: Declarations and Assignments
    1-185Section 17.1: Modifying constants
    1-186Section 17.2: Declaring and initializing constants
    1-187Section 17.3: Declaration
    1-188Section 17.4: Undefined
    1-189Section 17.5: Data Types
    1-190Section 17.6: Mathematic operations and assignment
    1-191Section 17.7: Assignment
    1-192Chapter 18: Loops
    1-193Section 18.1: Standard "for" loops
    1-194Section 18.2: "for ... of" loop
    1-195Section 18.3: "for ... in" loop
    1-196Section 18.4: "while" Loops
    1-197Section 18.5: "continue" a loop
    1-198Section 18.6: Break specific nested loops
    1-199Section 18.7: "do ... while" loop
    1-200Section 18.8: Break and continue labels
    1-201Chapter 19: Functions
    1-202Section 19.1: Function Scoping
    1-203Section 19.2: Currying
    1-204Section 19.3: Immediately Invoked Function Expressions
    1-205Section 19.4: Named Functions
    1-206Section 19.5: Binding `this` and arguments
    1-207Section 19.6: Functions with an Unknown Number of Arguments (variadic functions)
    1-208Section 19.7: Anonymous Function
    1-209Section 19.8: Default parameters
    1-210Section 19.9: Call and apply
    1-211Section 19.10: Partial Application
    1-212Section 19.11: Passing arguments by reference or value
    1-213Section 19.12: Function Arguments, "arguments" object, rest and spread parameters
    1-214Section 19.13: Function Composition
    1-215Section 19.14: Get the name of a function object
    1-216Section 19.15: Recursive Function
    1-217Section 19.16: Using the Return Statement
    1-218Section 19.17: Functions as a variable
    1-219Chapter 20: Functional JavaScript
    1-220Section 20.1: Higher-Order Functions
    1-221Section 20.2: Identity Monad
    1-222Section 20.3: Pure Functions
    1-223Section 20.4: Accepting Functions as Arguments
    1-224Chapter 21: Prototypes, objects
    1-225Section 21.1: Creation and initialising Prototype
    1-226Chapter 22: Classes
    1-227Section 22.1: Class Constructor
    1-228Section 22.2: Class Inheritance
    1-229Section 22.3: Static Methods
    1-230Section 22.4: Getters and Setters
    1-231Section 22.5: Private Members
    1-232Section 22.6: Methods
    1-233Section 22.7: Dynamic Method Names
    1-234Section 22.8: Managing Private Data with Classes
    1-235Section 22.9: Class Name binding
    1-236Chapter 23: Namespacing
    1-237Section 23.1: Namespace by direct assignment
    1-238Section 23.2: Nested Namespaces
    1-239Chapter 24: Context (this)
    1-240Section 24.1: this with simple objects
    1-241Section 24.2: Saving this for use in nested functions / objects
    1-242Section 24.3: Binding function context
    1-243Section 24.4: this in constructor functions
    1-244Chapter 25: Setters and Getters
    1-245Section 25.1: Defining a Setter/Getter Using Object.defineProperty
    1-246Section 25.2: Defining an Setter/Getter in a Newly Created Object
    1-247Section 25.3: Defining getters and setters in ES6 class
    1-248Chapter 26: Events
    1-249Section 26.1: Page, DOM and Browser loading
    1-250Chapter 27: Inheritance
    1-251Section 27.1: Standard function prototype
    1-252Section 27.2: Dierence between Object.key and Object.prototype.key
    1-253Section 27.3: Prototypal inheritance
    1-254Section 27.4: Pseudo-classical inheritance
    1-255Section 27.5: Setting an Object's prototype
    1-256Chapter 28: Method Chaining
    1-257Section 28.1: Chainable object design and chaining
    1-258Section 28.2: Method Chaining
    1-259Chapter 29: Callbacks
    1-260Section 29.1: Simple Callback Usage Examples
    1-261Section 29.2: Continuation (synchronous and asynchronous)
    1-262Section 29.3: What is a callback?
    1-263Section 29.4: Callbacks and `this`
    1-264Section 29.5: Callback using Arrow function
    1-265Section 29.6: Error handling and control-flow branching
    1-266Chapter 30: Intervals and Timeouts
    1-267Section 30.1: Recursive setTimeout
    1-268Section 30.2: Intervals
    1-269Section 30.3: Intervals
    1-270Section 30.4: Removing intervals
    1-271Section 30.5: Removing timeouts
    1-272Section 30.6: setTimeout, order of operations, clearTimeout
    1-273Chapter 31: Regular expressions
    1-274Section 31.1: Creating a RegExp Object
    1-275Section 31.2: RegExp Flags
    1-276Section 31.3: Check if string contains pattern using .test()
    1-277Section 31.4: Matching With .exec()
    1-278Section 31.5: Using RegExp With Strings
    1-279Section 31.6: RegExp Groups
    1-280Section 31.7: Replacing string match with a callback function
    1-281Section 31.8: Using Regex.exec() with parentheses regex to extract matches of a string
    1-282Chapter 32: Cookies
    1-283Section 32.1: Test if cookies are enabled
    1-284Section 32.2: Adding and Setting Cookies
    1-285Section 32.3: Reading cookies
    1-286Section 32.4: Removing cookies
    1-287Chapter 33: Web Storage
    1-288Section 33.1: Using localStorage
    1-289Section 33.2: Simpler way of handling Storage
    1-290Section 33.3: Storage events
    1-291Section 33.4: sessionStorage
    1-292Section 33.5: localStorage length
    1-293Section 33.6: Error conditions
    1-294Section 33.7: Clearing storage
    1-295Section 33.8: Remove Storage Item
    1-296Chapter 34: Data attributes
    1-297Section 34.1: Accessing data attributes
    1-298Chapter 35: JSON
    1-299Section 35.1: JSON versus JavaScript literals
    1-300Section 35.2: Parsing with a reviver function
    1-301Section 35.3: Serializing a value
    1-302Section 35.4: Serializing and restoring class instances
    1-303Section 35.5: Serializing with a replacer function
    1-304Section 35.6: Parsing a simple JSON string
    1-305Section 35.7: Cyclic object values
    1-306Chapter 36: AJAX
    1-307Section 36.1: Sending and Receiving JSON Data via POST
    1-308Section 36.2: Add an AJAX preloader
    1-309Section 36.3: Displaying the top JavaScript questions of the month from Stack Overflow's API
    1-310Section 36.4: Using GET with parameters
    1-311Section 36.5: Check if a file exists via a HEAD request
    1-312Section 36.6: Using GET and no parameters
    1-313Section 36.7: Listening to AJAX events at a global level
    1-314Chapter 37: Enumerations
    1-315Section 37.1: Enum definition using Object.freeze()
    1-316Section 37.2: Alternate definition
    1-317Section 37.3: Printing an enum variable
    1-318Section 37.4: Implementing Enums Using Symbols
    1-319Section 37.5: Automatic Enumeration Value
    1-320Chapter 38: Map
    1-321Section 38.1: Creating a Map
    1-322Section 38.2: Clearing a Map
    1-323Section 38.3: Removing an element from a Map
    1-324Section 38.4: Checking if a key exists in a Map
    1-325Section 38.5: Iterating Maps
    1-326Section 38.6: Getting and setting elements
    1-327Section 38.7: Getting the number of elements of a Map
    1-328Chapter 39: Timestamps
    1-329Section 39.1: High-resolution timestamps
    1-330Section 39.2: Get Timestamp in Seconds
    1-331Section 39.3: Low-resolution timestamps
    1-332Section 39.4: Support for legacy browsers
    1-333Chapter 40: Unary Operators
    1-334Section 40.1: Overview
    1-335Section 40.2: The typeof operator
    1-336Section 40.3: The delete operator
    1-337Section 40.4: The unary plus operator (+)
    1-338Section 40.5: The void operator
    1-339Section 40.6: The unary negation operator (-)
    1-340Section 40.7: The bitwise NOT operator (~)
    1-341Section 40.8: The logical NOT operator (!)
    1-342Chapter 41: Generators
    1-343Section 41.1: Generator Functions
    1-344Section 41.2: Sending Values to Generator
    1-345Section 41.3: Delegating to other Generator
    1-346Section 41.4: Iteration
    1-347Section 41.5: Async flow with generators
    1-348Section 41.6: Iterator-Observer interface
    1-349Chapter 42: Promises
    1-350Section 42.1: Introduction
    1-351Section 42.2: Promise chaining
    1-352Section 42.3: Waiting for multiple concurrent promises
    1-353Section 42.4: Reduce an array to chained promises
    1-354Section 42.5: Waiting for the first of multiple concurrent promises
    1-355Section 42.6: "Promisifying" functions with callbacks
    1-356Section 42.7: Error Handling
    1-357Section 42.8: Reconciling synchronous and asynchronous operations
    1-358Section 42.9: Delay function call
    1-359Section 42.10: "Promisifying" values
    1-360Section 42.11: Using ES2017 async/await
    1-361Section 42.12: Performing cleanup with finally()
    1-362Section 42.13: forEach with promises
    1-363Section 42.14: Asynchronous API request
    1-364Chapter 43: Set
    1-365Section 43.1: Creating a Set
    1-366Section 43.2: Adding a value to a Set
    1-367Section 43.3: Removing value from a set
    1-368Section 43.4: Checking if a value exist in a set
    1-369Section 43.5: Clearing a Set
    1-370Section 43.6: Getting set length
    1-371Section 43.7: Converting Sets to arrays
    1-372Section 43.8: Intersection and dierence in Sets
    1-373Section 43.9: Iterating Sets
    1-374Chapter 44: Modals - Prompts
    1-375Section 44.1: About User Prompts
    1-376Section 44.2: Persistent Prompt Modal
    1-377Section 44.3: Confirm to Delete element
    1-378Section 44.4: Usage of alert()
    1-379Section 44.5: Usage of prompt()
    1-380Chapter 45: execCommand and contenteditable
    1-381Section 45.1: Listening to Changes of contenteditable
    1-382Section 45.2: Getting started
    1-383Section 45.3: Copy to clipboard from textarea using execCommand("copy")
    1-384Section 45.4: Formatting
    1-385Chapter 46: History
    1-386Section 46.1: history.pushState()
    1-387Section 46.2: history.replaceState()
    1-388Section 46.3: Load a specific URL from the history list
    1-389Chapter 47: Navigator Object
    1-390Section 47.1: Get some basic browser data and return it as a JSON object
    1-391Chapter 48: BOM (Browser Object Model)
    1-392Section 48.1: Introduction
    1-393Section 48.2: Window Object Properties
    1-394Section 48.3: Window Object Methods
    1-395Chapter 49: The Event Loop
    1-396Section 49.1: The event loop in a web browser
    1-397Section 49.2: Asynchronous operations and the event loop
    1-398Chapter 50: Strict mode
    1-399Section 50.1: For entire scripts
    1-400Section 50.2: For functions
    1-401Section 50.3: Changes to properties
    1-402Section 50.4: Changes to global properties
    1-403Section 50.5: Duplicate Parameters
    1-404Section 50.6: Function scoping in strict mode
    1-405Section 50.7: Behaviour of a function's arguments list
    1-406Section 50.8: Non-Simple parameter lists
    1-407Chapter 51: Custom Elements
    1-408Section 51.1: Extending Native Elements
    1-409Section 51.2: Registering New Elements
    1-410Chapter 52: Data Manipulation
    1-411Section 52.1: Format numbers as money
    1-412Section 52.2: Extract extension from file name
    1-413Section 52.3: Set object property given its string name
    1-414Chapter 53: Binary Data
    1-415Section 53.1: Getting binary representation of an image file
    1-416Section 53.2: Converting between Blobs and ArrayBuers
    1-417Section 53.3: Manipulating ArrayBuers with DataViews
    1-418Section 53.4: Creating a TypedArray from a Base64 string
    1-419Section 53.5: Using TypedArrays
    1-420Section 53.6: Iterating through an arrayBuer
    1-421Chapter 54: Template Literals
    1-422Section 54.1: Basic interpolation and multiline strings
    1-423Section 54.2: Tagged strings
    1-424Section 54.3: Raw strings
    1-425Section 54.4: Templating HTML With Template Strings
    1-426Section 54.5: Introduction
    1-427Chapter 55: Fetch
    1-428Section 55.1: Getting JSON data
    1-429Section 55.2: Set Request Headers
    1-430Section 55.3: POST Data
    1-431Section 55.4: Send cookies
    1-432Section 55.5: GlobalFetch
    1-433Section 55.6: Using Fetch to Display Questions from the Stack Overflow API
    1-434Chapter 56: Scope
    1-435Section 56.1: Closures
    1-436Section 56.2: Hoisting
    1-437Section 56.3: Dierence between var and let
    1-438Section 56.4: Apply and Call syntax and invocation
    1-439Section 56.5: Arrow function invocation
    1-440Section 56.6: Bound invocation
    1-441Section 56.7: Method invocation
    1-442Section 56.8: Anonymous invocation
    1-443Section 56.9: Constructor invocation
    1-444Section 56.10: Using let in loops instead of var (click handlers example)
    1-445Chapter 57: Modules
    1-446Section 57.1: Defining a module
    1-447Section 57.2: Default exports
    1-448Section 57.3: Importing named members from another module
    1-449Section 57.4: Importing an entire module
    1-450Section 57.5: Importing named members with aliases
    1-451Section 57.6: Importing with side eects
    1-452Section 57.7: Exporting multiple named members
    1-453Chapter 58: Screen
    1-454Section 58.1: Getting the screen resolution
    1-455Section 58.2: Getting the “available” area of the screen
    1-456Section 58.3: Page width and height
    1-457Section 58.4: Window innerWidth and innerHeight Properties
    1-458Section 58.5: Getting color information about the screen
    1-459Chapter 59: Variable coercion/conversion
    1-460Section 59.1: Double Negation (!!x)
    1-461Section 59.2: Implicit conversion
    1-462Section 59.3: Converting to boolean
    1-463Section 59.4: Converting a string to a number
    1-464Section 59.5: Converting a number to a string
    1-465Section 59.6: Primitive to Primitive conversion table
    1-466Section 59.7: Convert an array to a string
    1-467Section 59.8: Array to String using array methods
    1-468Section 59.9: Converting a number to a boolean
    1-469Section 59.10: Converting a string to a boolean
    1-470Section 59.11: Integer to Float
    1-471Section 59.12: Float to Integer
    1-472Section 59.13: Convert string to float
    1-473Chapter 60: Destructuring assignment
    1-474Section 60.1: Destructuring Objects
    1-475Section 60.2: Destructuring function arguments
    1-476Section 60.3: Nested Destructuring
    1-477Section 60.4: Destructuring Arrays
    1-478Section 60.5: Destructuring inside variables
    1-479Section 60.6: Default Value While Destructuring
    1-480Section 60.7: Renaming Variables While Destructuring
    1-481Chapter 61: WebSockets
    1-482Section 61.1: Working with string messages
    1-483Section 61.2: Establish a web socket connection
    1-484Section 61.3: Working with binary messages
    1-485Section 61.4: Making a secure web socket connection
    1-486Chapter 62: Arrow Functions
    1-487Section 62.1: Introduction
    1-488Section 62.2: Lexical Scoping & Binding (Value of "this")
    1-489Section 62.3: Arguments Object
    1-490Section 62.4: Implicit Return
    1-491Section 62.5: Arrow functions as a constructor
    1-492Section 62.6: Explicit Return
    1-493Chapter 63: Workers
    1-494Section 63.1: Web Worker
    1-495Section 63.2: A simple service worker
    1-496Section 63.3: Register a service worker
    1-497Section 63.4: Communicating with a Web Worker
    1-498Section 63.5: Terminate a worker
    1-499Section 63.6: Populating your cache
    1-500Section 63.7: Dedicated Workers and Shared Workers
    1-501Chapter 64: requestAnimationFrame
    1-502Section 64.1: Use requestAnimationFrame to fade in element
    1-503Section 64.2: Keeping Compatibility
    1-504Section 64.3: Cancelling an Animation
    1-505Chapter 65: Creational Design Patterns
    1-506Section 65.1: Factory Functions
    1-507Section 65.2: Factory with Composition
    1-508Section 65.3: Module and Revealing Module Patterns
    1-509Section 65.4: Prototype Pattern
    1-510Section 65.5: Singleton Pattern
    1-511Section 65.6: Abstract Factory Pattern
    1-512Chapter 66: Detecting browser
    1-513Section 66.1: Feature Detection Method
    1-514Section 66.2: User Agent Detection
    1-515Section 66.3: Library Method
    1-516Chapter 67: Symbols
    1-517Section 67.1: Basics of symbol primitive type
    1-518Section 67.2: Using Symbol.for() to create global, shared symbols
    1-519Section 67.3: Converting a symbol into a string
    1-520Chapter 68: Transpiling
    1-521Section 68.1: Introduction to Transpiling
    1-522Section 68.2: Start using ES6/7 with Babel
    1-523Chapter 69: Automatic Semicolon Insertion - ASI
    1-524Section 69.1: Avoid semicolon insertion on return statements
    1-525Section 69.2: Rules of Automatic Semicolon Insertion
    1-526Section 69.3: Statements aected by automatic semicolon insertion
    1-527Chapter 70: Localization
    1-528Section 70.1: Number formatting
    1-529Section 70.2: Currency formatting
    1-530Section 70.3: Date and time formatting
    1-531Chapter 71: Geolocation
    1-532Section 71.1: Get updates when a user's location changes
    1-533Section 71.2: Get a user's latitude and longitude
    1-534Section 71.3: More descriptive error codes
    1-535Chapter 72: IndexedDB
    1-536Section 72.1: Opening a database
    1-537Section 72.2: Adding objects
    1-538Section 72.3: Retrieving data
    1-539Section 72.4: Testing for IndexedDB availability
    1-540Chapter 73: Modularization Techniques
    1-541Section 73.1: ES6 Modules
    1-542Section 73.2: Universal Module Definition (UMD)
    1-543Section 73.3: Immediately invoked function expressions (IIFE)
    1-544Section 73.4: Asynchronous Module Definition (AMD)
    1-545Section 73.5: CommonJS - Node.js
    1-546Chapter 74: Proxy
    1-547Section 74.1: Proxying property lookup
    1-548Section 74.2: Very simple proxy (using the set trap)
    1-549Chapter 75: .postMessage() and MessageEvent
    1-550Section 75.1: Getting Started
    1-551Chapter 76: WeakMap
    1-552Section 76.1: Creating a WeakMap object
    1-553Section 76.2: Getting a value associated to the key
    1-554Section 76.3: Assigning a value to the key
    1-555Section 76.4: Checking if an element with the key exists
    1-556Section 76.5: Removing an element with the key
    1-557Section 76.6: Weak reference demo
    1-558Chapter 77: WeakSet
    1-559Section 77.1: Creating a WeakSet object
    1-560Section 77.2: Adding a value
    1-561Section 77.3: Checking if a value exists
    1-562Section 77.4: Removing a value
    1-563Chapter 78: Escape Sequences
    1-564Section 78.1: Entering special characters in strings and regular expressions
    1-565Section 78.2: Escape sequence types
    1-566Chapter 79: Behavioral Design Patterns
    1-567Section 79.1: Observer pattern
    1-568Section 79.2: Mediator Pattern
    1-569Section 79.3: Command
    1-570Section 79.4: Iterator
    1-571Chapter 80: Server-sent events
    1-572Section 80.1: Setting up a basic event stream to the server
    1-573Section 80.2: Closing an event stream
    1-574Section 80.3: Binding event listeners to EventSource
    1-575Chapter 81: Async functions (async/await)
    1-576Section 81.1: Introduction
    1-577Section 81.2: Await and operator precedence
    1-578Section 81.3: Async functions compared to Promises
    1-579Section 81.4: Looping with async await
    1-580Section 81.5: Less indentation
    1-581Section 81.6: Simultaneous async (parallel) operations
    1-582Chapter 82: Async Iterators
    1-583Section 82.1: Basics
    1-584Chapter 83: How to make iterator usable inside async callback function
    1-585Section 83.1: Erroneous code, can you spot why this usage of key will lead to bugs?
    1-586Section 83.2: Correct Writing
    1-587Chapter 84: Tail Call Optimization
    1-588Section 84.1: What is Tail Call Optimization (TCO)
    1-589Section 84.2: Recursive loops
    1-590Chapter 85: Bitwise Operators - Real World Examples (snippets)
    1-591Section 85.1: Swapping Two Integers with Bitwise XOR (without additional memory allocation)
    1-592Section 85.2: Faster multiplication or division by powers of 2
    1-593Section 85.3: Number's Parity Detection with Bitwise AND
    1-594Chapter 86: Tilde ~
    1-595Section 86.1: ~ Integer
    1-596Section 86.2: ~~ Operator
    1-597Section 86.3: Converting Non-numeric values to Numbers
    1-598Section 86.4: Shorthands
    1-599Section 86.5: ~ Decimal
    1-600Chapter 87: Using JavaScript to get/set CSS custom variables
    1-601Section 87.1: How to get and set CSS variable property values
    1-602Chapter 88: Selection API
    1-603Section 88.1: Get the text of the selection
    1-604Section 88.2: Deselect everything that is selected
    1-605Section 88.3: Select the contents of an element
    1-606Chapter 89: File API, Blobs and FileReaders
    1-607Section 89.1: Read file as string
    1-608Section 89.2: Read file as dataURL
    1-609Section 89.3: Slice a file
    1-610Section 89.4: Get the properties of the file
    1-611Section 89.5: Selecting multiple files and restricting file types
    1-612Section 89.6: Client side csv download using Blob
    1-613Chapter 90: Notifications API
    1-614Section 90.1: Requesting Permission to send notifications
    1-615Section 90.2: Sending Notifications
    1-616Section 90.3: Closing a notification
    1-617Section 90.4: Notification events
    1-618Chapter 91: Vibration API
    1-619Section 91.1: Single vibration
    1-620Section 91.2: Check for support
    1-621Section 91.3: Vibration patterns
    1-622Chapter 92: Battery Status API
    1-623Section 92.1: Battery Events
    1-624Section 92.2: Getting current battery level
    1-625Section 92.3: Is battery charging?
    1-626Section 92.4: Get time left until battery is empty
    1-627Section 92.5: Get time left until battery is fully charged
    1-628Chapter 93: Fluent API
    1-629Section 93.1: Fluent API capturing construction of HTML articles with JS
    1-630Chapter 94: Web Cryptography API
    1-631Section 94.1: Creating digests (e.g. SHA-256)
    1-632Section 94.2: Cryptographically random data
    1-633Section 94.3: Generating RSA key pair and converting to PEM format
    1-634Section 94.4: Converting PEM key pair to CryptoKey
    1-635Chapter 95: Security issues
    1-636Section 95.1: Reflected Cross-site scripting (XSS)
    1-637Section 95.2: Persistent Cross-site scripting (XSS)
    1-638Section 95.3: Persistent Cross-site scripting from JavaScript string literals
    1-639Section 95.4: Why scripts from other people can harm your website and its visitors
    1-640Section 95.5: Evaled JSON injection
    1-641Chapter 96: Same Origin Policy & Cross-Origin Communication
    1-642Section 96.1: Safe cross-origin communication with messages
    1-643Section 96.2: Ways to circumvent Same-Origin Policy
    1-644Chapter 97: Error Handling
    1-645Section 97.1: Error objects
    1-646Section 97.2: Interaction with Promises
    1-647Section 97.3: Error types
    1-648Section 97.4: Order of operations plus advanced thoughts
    1-649Chapter 98: Global error handling in browsers
    1-650Section 98.1: Handling window.onerror to report all errors back to the server-side
    1-651Chapter 99: Debugging
    1-652Section 99.1: Interactive interpreter variables
    1-653Section 99.2: Breakpoints
    1-654Section 99.3: Using setters and getters to find what changed a property
    1-655Section 99.4: Using the console
    1-656Section 99.5: Automatically pausing execution
    1-657Section 99.6: Elements inspector
    1-658Section 99.7: Break when a function is called
    1-659Section 99.8: Stepping through code
    1-660Chapter 100: Unit Testing JavaScript
    1-661Section 100.1: Unit Testing Promises with Mocha, Sinon, Chai and Proxyquire
    1-662Section 100.2: Basic Assertion
    1-663Chapter 101: Evaluating JavaScript
    1-664Section 101.1: Evaluate a string of JavaScript statements
    1-665Section 101.2: Introduction
    1-666Section 101.3: Evaluation and Math
    1-667Chapter 102: Linters - Ensuring code quality
    1-668Section 102.1: JSHint
    1-669Section 102.2: ESLint / JSCS
    1-670Section 102.3: JSLint
    1-671Chapter 103: Anti-patterns
    1-672Section 103.1: Chaining assignments in var declarations
    1-673Chapter 104: Performance Tips
    1-674Section 104.1: Avoid try/catch in performance-critical functions
    1-675Section 104.2: Limit DOM Updates
    1-676Section 104.3: Benchmarking your code - measuring execution time
    1-677Section 104.4: Use a memoizer for heavy-computing functions
    1-678Section 104.5: Initializing object properties with null
    1-679Section 104.6: Reuse objects rather than recreate
    1-680Section 104.7: Prefer local variables to globals, attributes, and indexed values
    1-681Section 104.8: Be consistent in use of Numbers
    1-682Chapter 105: Memory eciency
    1-683Section 105.1: Drawback of creating true private method
    1-684Appendix A: Reserved Keywords
    1-685Section A.1: Reserved Keywords
    1-686Section A.2: Identifiers & Identifier Names
    1-687Credits
    1-688You may also like

    常見問答

    您可以透過手機、平板或是電腦登入 HiSKIO 平台,在【我的學習】>【我的書籍】頁面,選擇想看的電子書。

    猜你喜歡

    用戶評價

    | 收集中

    銷售方案