更新时间:2021-08-27 18:42:09
封面
Title Page
Copyright and Credits
Learning JavaScript Data Structures and Algorithms Third Edition
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
JavaScript – A Quick Overview
JavaScript data structure and algorithms
Setting up the environment
The minimum setup to work with JavaScript
Using web servers
Node.js http-server
JavaScript basics
Variables
Scope variable
Operators
Truthy and falsy
Functions of the equals operators (== and ===)
Control structures
Conditional statements
Loops
Functions
Object-oriented programming in JavaScript
Debugging and tools
Debugging with VSCode
Summary
ECMAScript and TypeScript Overview
ECMAScript or JavaScript?
ES6 ES2015 ES7 ES2016 ES8 ES2017 and ES.Next
The compatibility table
Using Babel.js
ECMAScript 2015+ functionalities
let and const instead of var
Variables scope with let and const
Template literals
Arrow functions
Default parameter values for functions
Declaring the spread and rest operators
Enhanced object properties
Object-oriented programming with classes
Inheritance
Working with getters and setters
Exponentiation operator
Modules
Running ES2015 modules in the browser and with Node.js
Using native ES2015 imports in Node.js
Running ES2015 modules in the browser
ES2015+ backward compatibility
Introducing TypeScript
Type inference
Interfaces
Generics
Other TypeScript functionalities
TypeScript compile-time checking in JavaScript files
Arrays
Why should we use arrays?
Creating and initializing arrays
Accessing elements and iterating an array
Adding elements
Inserting an element at the end of the array
Using the push method
Inserting an element in the first position
Using the unshift method
Removing elements
Removing an element from the end of the array
Removing an element from the first position
Using the shift method
Adding and removing elements from a specific position
Two-dimensional and multi-dimensional arrays
Iterating the elements of two-dimensional arrays
Multi-dimensional arrays
References for JavaScript array methods
Joining multiple arrays
Iterator functions
Iterating using the every method
Iterating using the some method
Iterating using forEach
Using map and filter
Using the reduce method
ECMAScript 6 and new array functionalities
Iterating using the for...of loop
Using the @@iterator object
Array entries keys and values
Using the from method
Using the Array.of method