JavaScript

JavaScript Array Undefined Items

This article discusses undefined items in JavaScript arrays, explaining the differences between explicitly undefined values and uninitialized array elements, and how array iteration behaves differently in these cases.

Jan 27, 2021

Inline JavaScript Event Binding

How to bind events with inline JavaScript, how it differs from React’s model, and practical tips for native usage.

Jan 26, 2021

Difference Between yield and yield*

What yield and yield* do in generators, how they differ, and when to use each, with examples.

Jan 15, 2021

Encoding Pitfalls to Watch

Two web bugs traced to encoding: URL fragments in the URL API and window.btoa choking on non-ASCII.

Dec 16, 2020

JIT vs AOT

This article provides a comparison between JIT (Just-In-Time) and AOT (Ahead-Of-Time) compilation, including their advantages, implementation details, and practical differences in various programming environments.

Dec 6, 2020

Limitations of React's componentWillUnmount

This article discusses the limitations of React's componentWillUnmount lifecycle method, including its advantages, implementation details, and relevant resources to help developers understand and work around these constraints.

Dec 5, 2020

TypeScript Enum vs. ES6 Symbol

Compares TypeScript enums and ES6 symbols so you know when to choose each for identifiers and constants.

Dec 2, 2020

JavaScript Regular Expressions: Literal vs Constructor

This article explains the differences between JavaScript regular expression literals and constructors, including their advantages, implementation details, and related resources. These concepts help improve efficiency when working with regular expressions in JavaScript.

Nov 28, 2020

Daily Challenge — Predict the Rendered Value

A Vue question on reactivity and lifecycle: what value renders on the page, and why.

Oct 31, 2020

Daily Challenge — Avoid Infinite Loop

A frontend quiz: modify the code to avoid an infinite loop, with analysis and solutions (Web Worker, async approaches).

Oct 29, 2020

JavaScript Event Loop

This post explains the JavaScript event loop, including the model, tasks, and references to help you understand it more efficiently.

Sep 26, 2020

Package.json Usage Tips and Tricks

Advanced usage tips for package.json beyond basic dependencies, including version enforcement, custom fields, and practical configuration techniques.

Jul 26, 2020

Understanding Closures

Clarifying what closures are, why they matter in JavaScript, and practice problems that cement the idea.

Jul 6, 2020

Lazy Loading Principles

This article introduces lazy loading principles, including usage scenarios and implementation details, to improve efficiency in understanding lazy loading principles.

Jul 5, 2020

Fancy Console

Discover how to create fancy console outputs with colorful styles and ASCII art to make your webpage console more engaging.

Jul 4, 2020

Native Browser Support for JS Base64

This post walks through browser-native JS Base64 support, covering use cases and implementation details to help you work with Base64 more efficiently.

Jul 2, 2020

Assertion Practices in JS Development and Debugging

This post discusses assertion practices in JS development and debugging, including concepts, use cases, and references.

Jun 25, 2020

No Nested Ternary

This article introduces the no-nested-ternary rule, including its advantages, implementation details, and relevant resources. These steps can help improve efficiency when avoiding nested ternary expressions.

May 23, 2020

[Translation] Event Handler Naming in React

This post translates and discusses naming conventions for event handlers in React, with practical guidance and references.

Apr 11, 2020

window.open Basics

A clarification on window.open URLs, relative vs absolute paths, dev vs build behavior, and why both may 'work' during development.

Apr 2, 2020

JS Precision Math: Choosing big.js vs mathjs

This post compares big.js and mathjs for JavaScript precision calculations, including pros, size, and usage considerations.

Apr 1, 2020

JavaScript method vs function vs member

This article explains the differences between JavaScript methods, functions, and members, including their advantages, implementation details, and related resources. These concepts help improve efficiency in JavaScript development.

Mar 1, 2020

Effective JavaScript Reading Notes

This article contains my reading notes on Effective JavaScript, including key insights, implementation details, and related resources that help improve JavaScript development efficiency and understanding.

Feb 24, 2020

Why I Hate Lodash

This article explains why I hate Lodash, including usage scenarios and implementation details, to improve understanding of the issues with over-relying on Lodash.

Feb 16, 2020

Time Formatting in JavaScript

This post covers time formatting in JavaScript, including UTC display and locale-based formatting.

Feb 3, 2020