avatar
Siz Long

My name is Siz. I am a computer science graduate student specializing in backend development with Golang and Python, seeking opportunities in innovative tech projects. My personal website is me.longsizhuo.com .Connect with me on LinkedIn: https://www.linkedin.com/in/longsizhuo/.

  • Resume
  • Archives
  • Categories
  • Photos
  • Music



{{ date }}

{{ time }}

avatar
Siz Long

My name is Siz. I am a computer science graduate student specializing in backend development with Golang and Python, seeking opportunities in innovative tech projects. My personal website is me.longsizhuo.com .Connect with me on LinkedIn: https://www.linkedin.com/in/longsizhuo/.

  • 主页
  • Resume
  • Archives
  • Categories
  • Photos
  • Music

JavaScript Advanced Concepts

  2023-06-06        
字数统计: 3.2k字   |   阅读时长: 19min

JavaScript Advanced Concepts

Moving beyond the basics, JavaScript has many powerful advanced features that enable sophisticated application development. This guide covers the key advanced concepts that every frontend developer should understand.

Scope and Closures

Execution Context and Scope Chain

Every time JavaScript code runs, it’s within an execution context. There are three types:

  • Global Execution Context: Default context for code that’s not inside any function
  • Function Execution Context: Created when a function is called
  • Eval Execution Context: Created when code is executed in an eval function

Each context has:

  • Variable Environment: Variables, functions, and arguments
  • Scope Chain: References to outer variable environments
  • this Value: The value of this in that context
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
let globalVar = "I'm global";

function outer() {
let outerVar = "I'm in outer";

function inner() {
let innerVar = "I'm in inner";
console.log(innerVar); // Accessible: own scope
console.log(outerVar); // Accessible: outer function's scope
console.log(globalVar); // Accessible: global scope
}

inner();
// console.log(innerVar); // Error: not accessible (inner scope)
}

outer();
// console.log(outerVar); // Error: not accessible (outer function scope)

Closures

A closure is created when a function retains access to its lexical scope even when executed outside that scope:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function createCounter() {
let count = 0; // Private variable

return {
increment() {
count++;
return count;
},
decrement() {
count--;
return count;
},
getValue() {
return count;
}
};
}

const counter = createCounter();
console.log(counter.increment()); // 1
console.log(counter.increment()); // 2
console.log(counter.getValue()); // 2
console.log(counter.decrement()); // 1

// count is not directly accessible
// console.log(counter.count); // undefined

Closures are commonly used for:

  • Data encapsulation (private variables)
  • Factory functions
  • Event handlers and callbacks
  • Partially applied functions

Module Pattern

Closures enable the module pattern, a way to create private variables and methods:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const calculator = (function() {
// Private variables/methods
let result = 0;

function validateNumber(num) {
return typeof num === 'number' && !isNaN(num);
}

// Public API
return {
add(num) {
if (validateNumber(num)) {
result += num;
}
return this; // For method chaining
},
subtract(num) {
if (validateNumber(num)) {
result -= num;
}
return this;
},
getResult() {
return result;
},
reset() {
result = 0;
return this;
}
};
})(); // IIFE - Immediately Invoked Function Expression

calculator.add(5).add(10).subtract(3);
console.log(calculator.getResult()); // 12
calculator.reset();
console.log(calculator.getResult()); // 0

This Binding

The value of this depends on how a function is called:

Default Binding

When a function is called without any context, this refers to the global object (or undefined in strict mode):

1
2
3
4
5
function showThis() {
console.log(this);
}

showThis(); // window in browser (or global in Node.js), or undefined in strict mode

Implicit Binding

When a function is called as a method of an object, this refers to that object:

1
2
3
4
5
6
7
8
9
10
11
12
const user = {
name: "Alice",
greet() {
console.log(`Hello, I'm ${this.name}`);
}
};

user.greet(); // "Hello, I'm Alice"

// But if we extract the method:
const greetFunction = user.greet;
greetFunction(); // "Hello, I'm undefined" (default binding applies)

Explicit Binding

You can explicitly set this using call, apply, or bind:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function introduce(greeting, punctuation) {
console.log(`${greeting}, I'm ${this.name}${punctuation}`);
}

const person = { name: "Bob" };

// Using call (comma-separated arguments)
introduce.call(person, "Hi", "!"); // "Hi, I'm Bob!"

// Using apply (arguments as array)
introduce.apply(person, ["Hello", "."]); // "Hello, I'm Bob."

// Using bind (returns a new function with bound this)
const boundIntroduce = introduce.bind(person, "Hey");
boundIntroduce("..."); // "Hey, I'm Bob..."

New Binding

When a function is used as a constructor with new, this refers to the newly created object:

1
2
3
4
5
6
7
8
9
function Person(name) {
this.name = name;
this.sayName = function() {
console.log(`My name is ${this.name}`);
};
}

const alice = new Person("Alice");
alice.sayName(); // "My name is Alice"

Arrow Functions and Lexical This

Arrow functions don’t have their own this. They inherit this from the surrounding scope:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const obj = {
name: "Object",
regularMethod: function() {
console.log(`Regular method: ${this.name}`);

// Inner function loses this context
function innerFunction() {
console.log(`Inner function: ${this.name}`); // undefined (or global)
}

// Arrow function preserves this context
const arrowFunction = () => {
console.log(`Arrow function: ${this.name}`); // "Object"
};

innerFunction();
arrowFunction();
}
};

obj.regularMethod();

Prototypes and Inheritance

Prototype Chain

JavaScript uses a prototype chain for inheritance. Every object has a prototype (except for the base Object.prototype):

1
2
3
4
const arr = [];
console.log(arr.__proto__ === Array.prototype); // true
console.log(Array.prototype.__proto__ === Object.prototype); // true
console.log(Object.prototype.__proto__); // null

Creating Objects with Prototypes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Constructor function
function Animal(name) {
this.name = name;
}

Animal.prototype.makeSound = function() {
return "Generic animal sound";
};

// Inheritance with constructor functions
function Dog(name, breed) {
Animal.call(this, name); // Call parent constructor
this.breed = breed;
}

// Set up prototype chain
Dog.prototype = Object.create(Animal.prototype);
Dog.prototype.constructor = Dog; // Fix constructor property

// Override method
Dog.prototype.makeSound = function() {
return "Woof!";
};

// Add new method
Dog.prototype.fetch = function() {
return `${this.name} is fetching!`;
};

const animal = new Animal("Generic Animal");
const dog = new Dog("Rex", "German Shepherd");

console.log(animal.makeSound()); // "Generic animal sound"
console.log(dog.makeSound()); // "Woof!"
console.log(dog.fetch()); // "Rex is fetching!"
console.log(dog instanceof Dog); // true
console.log(dog instanceof Animal); // true
console.log(dog instanceof Object); // true

Class Syntax (ES6+)

ES6 introduced a cleaner syntax for working with prototypes via classes:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
class Animal {
constructor(name) {
this.name = name;
}

makeSound() {
return "Generic animal sound";
}

// Static method (on the class, not instances)
static isAnimal(obj) {
return obj instanceof Animal;
}
}

class Dog extends Animal {
constructor(name, breed) {
super(name); // Call parent constructor
this.breed = breed;
}

makeSound() {
return "Woof!";
}

fetch() {
return `${this.name} is fetching!`;
}

// Getter
get description() {
return `${this.name} is a ${this.breed}`;
}

// Setter
set nickname(value) {
this._nickname = value;
}

get nickname() {
return this._nickname;
}
}

const dog = new Dog("Max", "Labrador");
console.log(dog.makeSound()); // "Woof!"
console.log(dog.description); // "Max is a Labrador"
dog.nickname = "Maxie";
console.log(dog.nickname); // "Maxie"
console.log(Animal.isAnimal(dog)); // true

Asynchronous JavaScript

Callbacks

Traditional way to handle asynchronous operations, but can lead to “callback hell”:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function fetchData(callback) {
setTimeout(() => {
const data = { id: 1, name: "Product" };
callback(null, data); // Error-first callback pattern
}, 1000);
}

fetchData((error, data) => {
if (error) {
console.error("Error:", error);
return;
}

console.log("Data:", data);

// Nested callback - leads to "callback hell" with more nesting
fetchRelatedData(data.id, (error, relatedData) => {
if (error) {
console.error("Error:", error);
return;
}

console.log("Related data:", relatedData);
});
});

Promises

Promises provide a cleaner way to work with asynchronous code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
function fetchData() {
return new Promise((resolve, reject) => {
setTimeout(() => {
const data = { id: 1, name: "Product" };
// Simulate success
resolve(data);
// Or failure: reject(new Error("Failed to fetch data"))
}, 1000);
});
}

function fetchRelatedData(id) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve([{ id: 101, productId: id, name: "Related Item" }]);
}, 1000);
});
}

// Promise chaining
fetchData()
.then(data => {
console.log("Data:", data);
return fetchRelatedData(data.id);
})
.then(relatedData => {
console.log("Related data:", relatedData);
})
.catch(error => {
console.error("Error:", error);
})
.finally(() => {
console.log("Operation complete (success or failure)");
});

// Promise combinators
Promise.all([fetchData(), fetchRelatedData(1)])
.then(([data, relatedData]) => {
console.log("All results:", data, relatedData);
})
.catch(error => {
console.error("Any error:", error);
});

Promise.race([
fetchData(),
new Promise((_, reject) => setTimeout(() => reject(new Error("Timeout")), 2000))
])
.then(result => console.log("First to complete:", result))
.catch(error => console.error("First to fail:", error));

Async/Await

Built on promises, async/await provides an even cleaner syntax for asynchronous code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
async function fetchAllData() {
try {
// await pauses execution until the promise resolves
const data = await fetchData();
console.log("Data:", data);

const relatedData = await fetchRelatedData(data.id);
console.log("Related data:", relatedData);

return { data, relatedData }; // This is wrapped in a Promise
} catch (error) {
console.error("Error in fetchAllData:", error);
throw error; // Re-throw for callers to handle
}
}

// Calling the async function
fetchAllData()
.then(result => console.log("Final result:", result))
.catch(error => console.error("Caught at call site:", error));

// Parallel operations with async/await
async function fetchInParallel() {
try {
// Start both operations at once
const dataPromise = fetchData();
const relatedPromise = fetchRelatedData(1);

// Wait for both to complete
const [data, related] = await Promise.all([dataPromise, relatedPromise]);

console.log("Parallel results:", data, related);
} catch (error) {
console.error("Parallel error:", error);
}
}

Generators and Iterators

Iterators

Objects that implement a next() method:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const rangeIterator = {
start: 0,
end: 3,
current: 0,

// Required iterator method
next() {
if (this.current < this.end) {
return { value: this.current++, done: false };
}
return { value: undefined, done: true };
}
};

let result = rangeIterator.next();
while (!result.done) {
console.log(result.value); // 0, 1, 2
result = rangeIterator.next();
}

Iterables

Objects that implement the iterator protocol via Symbol.iterator:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const rangeIterable = {
start: 0,
end: 3,

// This makes the object iterable
[Symbol.iterator]() {
let current = this.start;
const end = this.end;

return {
next() {
if (current < end) {
return { value: current++, done: false };
}
return { value: undefined, done: true };
}
};
}
};

// Now we can use for...of
for (const num of rangeIterable) {
console.log(num); // 0, 1, 2
}

// Or spread operator
const numbers = [...rangeIterable]; // [0, 1, 2]

Generators

Functions that can pause and resume execution:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function* rangeGenerator(start, end) {
for (let i = start; i < end; i++) {
yield i;
}
}

// Using the generator
const gen = rangeGenerator(0, 3);
console.log(gen.next()); // { value: 0, done: false }
console.log(gen.next()); // { value: 1, done: false }
console.log(gen.next()); // { value: 2, done: false }
console.log(gen.next()); // { value: undefined, done: true }

// Generator is iterable
for (const num of rangeGenerator(0, 3)) {
console.log(num); // 0, 1, 2
}

// Infinite generator with control
function* idGenerator() {
let id = 1;
while (true) {
const increment = yield id++; // yield returns control and accepts a value
if (increment) {
id += increment;
}
}
}

const ids = idGenerator();
console.log(ids.next().value); // 1
console.log(ids.next().value); // 2
console.log(ids.next(10).value); // 13 (2 + 1 + 10)

Async Generators and Iterators

Combining generators with async/await:

1
2
3
4
5
6
7
8
9
10
11
12
13
async function* asyncGenerator() {
yield await Promise.resolve(1);
yield await Promise.resolve(2);
yield await Promise.resolve(3);
}

async function useAsyncGenerator() {
for await (const value of asyncGenerator()) {
console.log(value); // 1, 2, 3
}
}

useAsyncGenerator();

Functional Programming Concepts

Pure Functions

Functions that:

  1. Always return the same output for the same input
  2. Have no side effects (don’t modify external state)
1
2
3
4
5
6
7
8
9
10
11
// Pure function
function add(a, b) {
return a + b;
}

// Impure function (side effect)
let total = 0;
function addToTotal(value) {
total += value; // Side effect: modifies external state
return total;
}

Higher-Order Functions

Functions that take and/or return other functions:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Function that returns a function
function multiply(factor) {
return function(number) {
return number * factor;
};
}

const double = multiply(2);
const triple = multiply(3);

console.log(double(5)); // 10
console.log(triple(5)); // 15

// Function that takes a function
function applyOperation(a, b, operation) {
return operation(a, b);
}

const sum = applyOperation(5, 3, (a, b) => a + b); // 8
const difference = applyOperation(5, 3, (a, b) => a - b); // 2

Composition

Combining multiple functions to create a new function:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Utility for function composition
const compose = (...functions) => input =>
functions.reduceRight((acc, fn) => fn(acc), input);

const pipe = (...functions) => input =>
functions.reduce((acc, fn) => fn(acc), input);

// Example functions
const addOne = x => x + 1;
const double = x => x * 2;
const square = x => x * x;

// Compose: execute from right to left
const transformCompose = compose(square, double, addOne);
console.log(transformCompose(3)); // square(double(addOne(3))) = square(double(4)) = square(8) = 64

// Pipe: execute from left to right
const transformPipe = pipe(addOne, double, square);
console.log(transformPipe(3)); // square(double(addOne(3))) = square(double(4)) = square(8) = 64

Currying

Transforming a function with multiple arguments into a sequence of functions each with a single argument:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Regular function
function add(a, b, c) {
return a + b + c;
}

// Curried version
function curriedAdd(a) {
return function(b) {
return function(c) {
return a + b + c;
};
};
}

// Usage
console.log(add(1, 2, 3)); // 6
console.log(curriedAdd(1)(2)(3)); // 6

// Partial application
const addOne = curriedAdd(1);
const addOneAndTwo = addOne(2);
console.log(addOneAndTwo(3)); // 6

// Currying utility
function curry(fn) {
return function curried(...args) {
if (args.length >= fn.length) {
return fn.apply(this, args);
} else {
return function(...args2) {
return curried.apply(this, args.concat(args2));
};
}
};
}

const curriedAddUtil = curry(add);
console.log(curriedAddUtil(1)(2)(3)); // 6
console.log(curriedAddUtil(1, 2)(3)); // 6
console.log(curriedAddUtil(1, 2, 3)); // 6

Immutability

Working with data without modifying the original:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Modifying arrays
const numbers = [1, 2, 3, 4];

// Bad (mutates original)
numbers.push(5);

// Good (returns new array)
const newNumbers = [...numbers, 5];
const filteredNumbers = numbers.filter(n => n > 2);
const doubledNumbers = numbers.map(n => n * 2);

// Modifying objects
const person = { name: "Alice", age: 30 };

// Bad (mutates original)
person.age = 31;

// Good (returns new object)
const updatedPerson = { ...person, age: 31 };
const withoutAge = (({ age, ...rest }) => rest)(person);

Proxy and Reflect

Proxy

Objects that intercept and redefine operations for another object:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const target = {
name: "Target",
age: 25
};

const handler = {
get(target, prop, receiver) {
console.log(`Getting ${prop}`);
return prop in target ? target[prop] : `No property ${prop}`;
},

set(target, prop, value, receiver) {
console.log(`Setting ${prop} to ${value}`);
if (prop === "age" && typeof value !== "number") {
throw new TypeError("Age must be a number");
}
target[prop] = value;
return true; // Indicate success
},

has(target, prop) {
console.log(`Checking if ${prop} exists`);
return prop in target;
},

deleteProperty(target, prop) {
console.log(`Deleting ${prop}`);
delete target[prop];
return true; // Indicate success
}
};

const proxy = new Proxy(target, handler);

// Test operations
console.log(proxy.name); // Getting name, Target
console.log(proxy.unknown); // Getting unknown, No property unknown

proxy.age = 30; // Setting age to 30
// proxy.age = "thirty"; // TypeError: Age must be a number

console.log("name" in proxy); // Checking if name exists, true

delete proxy.age; // Deleting age

Reflect

Object with static methods for interceptable operations:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Using Reflect with Proxy
const target = { name: "Target", age: 25 };

const handler = {
get(target, prop, receiver) {
console.log(`Getting ${prop}`);
return Reflect.get(target, prop, receiver);
},

set(target, prop, value, receiver) {
console.log(`Setting ${prop} to ${value}`);
return Reflect.set(target, prop, value, receiver);
}
};

const proxy = new Proxy(target, handler);
proxy.name = "New Target"; // Setting name to New Target
console.log(proxy.name); // Getting name, New Target

// Direct use of Reflect
console.log(Reflect.has(target, "age")); // true
console.log(Reflect.ownKeys(target)); // ["name", "age"]
console.log(Reflect.getPrototypeOf(target)); // [Object: null prototype] {}
Reflect.defineProperty(target, "property", { value: 42 });

Memory Management and Optimization

Memory Lifecycle

  1. Allocation: When memory is allocated by the JavaScript engine
  2. Usage: When the program reads/writes to that memory
  3. Release: When the memory is no longer needed and can be freed

Garbage Collection

JavaScript automatically manages memory using garbage collection:

  • Mark and Sweep: The most common algorithm used in modern browsers
    1. The garbage collector builds a list of “roots” (global objects)
    2. It marks these roots and all references from these roots
    3. It collects all non-marked objects

Memory Leaks

Common causes of memory leaks:

  1. Accidental Global Variables:
1
2
3
function leak() {
leakedVariable = "I'm leaked"; // Missing var/let/const
}
  1. Forgotten Timers or Callbacks:
1
2
3
4
5
6
7
8
function setupTimer() {
const largeData = new Array(10000000).fill('x');

setInterval(() => {
// This keeps largeData in memory indefinitely
console.log(largeData.length);
}, 1000);
}
  1. Closures Capturing Variables:
1
2
3
4
5
6
7
8
function createLeakyFunction() {
const largeData = new Array(10000000).fill('x');

return function() {
// This inner function captures largeData
console.log(largeData[0]);
};
}
  1. Detached DOM Elements:
1
2
3
4
5
6
7
8
9
10
11
12
function detachedDOM() {
const div = document.createElement('div');
div.innerHTML = 'A lot of content...';

// Store reference to the DOM element but never append it to the DOM
// or remove the reference when done
const detachedElements = [];
detachedElements.push(div);

// Later remove from DOM but keep in array
// detachedElements still holds a reference, preventing garbage collection
}

Performance Optimization

  1. Object Pooling:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Reuse objects instead of creating new ones
const objectPool = [];

function getObject() {
if (objectPool.length > 0) {
return objectPool.pop();
}
return { x: 0, y: 0 }; // Create new if pool is empty
}

function releaseObject(obj) {
obj.x = 0;
obj.y = 0;
objectPool.push(obj);
}
  1. Throttling and Debouncing:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Throttle: Execute at most once every X ms
function throttle(func, limit) {
let lastFunc;
let lastRan;
return function(...args) {
if (!lastRan) {
func.apply(this, args);
lastRan = Date.now();
} else {
clearTimeout(lastFunc);
lastFunc = setTimeout(() => {
if (Date.now() - lastRan >= limit) {
func.apply(this, args);
lastRan = Date.now();
}
}, limit - (Date.now() - lastRan));
}
};
}

// Debounce: Execute only after X ms have passed without another call
function debounce(func, delay) {
let timeout;
return function(...args) {
clearTimeout(timeout);
timeout = setTimeout(() => {
func.apply(this, args);
}, delay);
};
}

// Example usage
window.addEventListener('resize', throttle(() => {
console.log('Resize event throttled');
}, 200));

document.getElementById('search').addEventListener('input', debounce((e) => {
console.log('Search query:', e.target.value);
}, 300));

Learning Resources

  • You Don’t Know JS (book series)
  • JavaScript: The Good Parts
  • Functional-Light JavaScript
  • Exploring ES6
  • JavaScript Allongé
  • MDN Web Docs - JavaScript
  • JavaScript.info
  • Frontend Masters - Advanced JavaScript courses
  • Web Development
  • JavaScript
  • Advanced

扫一扫,分享到微信

微信分享二维码
ES6+ Features
JavaScript Basics
目录
  1. 1. JavaScript Advanced Concepts
    1. 1.1. Scope and Closures
      1. 1.1.1. Execution Context and Scope Chain
      2. 1.1.2. Closures
      3. 1.1.3. Module Pattern
    2. 1.2. This Binding
      1. 1.2.1. Default Binding
      2. 1.2.2. Implicit Binding
      3. 1.2.3. Explicit Binding
      4. 1.2.4. New Binding
      5. 1.2.5. Arrow Functions and Lexical This
    3. 1.3. Prototypes and Inheritance
      1. 1.3.1. Prototype Chain
      2. 1.3.2. Creating Objects with Prototypes
      3. 1.3.3. Class Syntax (ES6+)
    4. 1.4. Asynchronous JavaScript
      1. 1.4.1. Callbacks
      2. 1.4.2. Promises
      3. 1.4.3. Async/Await
    5. 1.5. Generators and Iterators
      1. 1.5.1. Iterators
      2. 1.5.2. Iterables
      3. 1.5.3. Generators
      4. 1.5.4. Async Generators and Iterators
    6. 1.6. Functional Programming Concepts
      1. 1.6.1. Pure Functions
      2. 1.6.2. Higher-Order Functions
      3. 1.6.3. Composition
      4. 1.6.4. Currying
      5. 1.6.5. Immutability
    7. 1.7. Proxy and Reflect
      1. 1.7.1. Proxy
      2. 1.7.2. Reflect
    8. 1.8. Memory Management and Optimization
      1. 1.8.1. Memory Lifecycle
      2. 1.8.2. Garbage Collection
      3. 1.8.3. Memory Leaks
      4. 1.8.4. Performance Optimization
    9. 1.9. Learning Resources

153 篇 | 133k
次 | 人
这里自动载入天数这里自动载入时分秒
2022-2025 loong loong | 新南威尔士龙龙号