6. JavaScript - promiseMap Utility FunctionpromiseMap is commonly used to batch-process a group of asynchronous tasks that only differ by the parameters passed in each time. However, we often want these tasks to run in a controlled pace, rather than all being triggered at once. promiseMap(tas...May 5, 2025 · 3 min readweb-zhang91.hashnode.dev
5. JavaScript - The Issue of Hard Binding with bindFunction.prototype.bind() permanently binds the function’s this value to a specific object. Even if you later try to set this using other methods such as call, apply, or event binding, it will not change. What is softBind? In JavaScript, softBind is ...May 4, 2025 · 2 min readweb-zhang91.hashnode.dev
4. Call, Apply, And Bind In JavaScript4.1 Why Manually Change the this Value in a Function Because the value of this is dynamic, depending on how the function is called, rather than being static. Here are a few common use cases that explain why we need to manually adjust the value of thi...May 4, 2025 · 4 min readweb-zhang91.hashnode.dev
3. JavaScript Get The Browser Unique Identifier Through The Browser Canvas Object3.1 Basic principles There are subtle differences in the "drawing" of the browser of each device, and these differences can be accurately recorded by canvas, which can be regarded as the digital fingerprint of the device. These subtle differences inc...Apr 30, 2025 · 5 min readweb-zhang91.hashnode.dev
2. JavaScript Promise Simple Implementation2.1 Key Concepts of Promise Three States: pending (in progress) fulfilled (successfully completed) rejected (failed) Irreversible State Transition: Once a promise changes from pending to fulfilled or rejected, it cannot change again. The the...Apr 22, 2025 · 3 min readweb-zhang91.hashnode.dev