Tagged articles
23 articles
Page 1 of 1
Deepin Linux
Deepin Linux
Mar 22, 2026 · Fundamentals

Mastering const and static in C++: When and How to Use Them

This article provides a comprehensive guide to the const and static modifiers in C/C++, covering their distinct purposes, usage with variables, pointers, functions, and class members, and answering common interview questions with clear explanations and practical code examples.

C++constinterview
0 likes · 17 min read
Mastering const and static in C++: When and How to Use Them
FunTester
FunTester
Oct 17, 2025 · Fundamentals

Why Does var Print 2 Twice? Unraveling JavaScript’s Function Scope and Hoisting

This article explains why a JavaScript function using var prints “2” twice, by detailing var’s function scope, variable hoisting, the compilation and execution phases, and contrasting the behavior with let and const, while offering practical coding recommendations to avoid common pitfalls.

JavaScriptVarconst
0 likes · 9 min read
Why Does var Print 2 Twice? Unraveling JavaScript’s Function Scope and Hoisting
Liangxu Linux
Liangxu Linux
Jul 10, 2025 · Fundamentals

When to Use const vs constexpr in C++? A Practical Guide

This article explains the differences between C++ const and constexpr, using a kettle analogy, detailed code examples, and practical guidelines to help developers choose the right keyword for compile‑time or runtime constants, improve performance, and write safer code.

C++Compile-timeConstants
0 likes · 8 min read
When to Use const vs constexpr in C++? A Practical Guide
Deepin Linux
Deepin Linux
Jul 3, 2025 · Fundamentals

Mastering const vs constexpr in C++: Key Differences and Interview Tips

This article explains the distinct roles of const and constexpr in C++, covering their usage with variables, pointers, function parameters, and class members, comparing compile‑time and run‑time behaviors, and offering practical interview strategies and code examples for developers.

CCompile-timeconst
0 likes · 19 min read
Mastering const vs constexpr in C++: Key Differences and Interview Tips
JavaScript
JavaScript
Jun 3, 2025 · Frontend Development

Why IIFEs Are Obsolete: Embrace Block Scope with let/const

This article explains how the traditional IIFE pattern, once essential for creating private scopes in JavaScript, has been superseded by modern block‑level scope using let and const, offering cleaner syntax, better performance, easier debugging, and seamless integration with ES6+ features.

IIFEJavaScriptblock scope
0 likes · 5 min read
Why IIFEs Are Obsolete: Embrace Block Scope with let/const
JavaScript
JavaScript
May 6, 2025 · Frontend Development

Why Sticking to ES5 Is Holding Your JavaScript Back – Modern Alternatives Explained

This article examines common ES5 JavaScript patterns—such as var declarations, mixed function definitions, callback hell, the arguments object, constructor‑based inheritance, string concatenation, and manual loops—and shows how modern ES6+ features like let/const, arrow functions, promises, rest parameters, classes, template literals, spread syntax, and array methods provide cleaner, safer, and more maintainable code.

Arrow FunctionsJavaScriptasync/await
0 likes · 8 min read
Why Sticking to ES5 Is Holding Your JavaScript Back – Modern Alternatives Explained
JavaScript
JavaScript
Mar 2, 2025 · Frontend Development

Why ‘var’ Is Dangerous and How let/const Solve Its Pitfalls

This article examines why the traditional JavaScript var keyword should be avoided, explains the subtle pitfalls of its function scope, hoisting, and global leakage, and highlights the essential, often overlooked features of let and const—including temporal dead zone, true block scope, and immutability nuances.

JavaScriptVarconst
0 likes · 8 min read
Why ‘var’ Is Dangerous and How let/const Solve Its Pitfalls
php Courses
php Courses
Dec 3, 2024 · Backend Development

Understanding PHP Constants: Definition, Usage, and Best Practices

This article explains what PHP constants are, how to define them with define() or const, showcases practical examples, outlines their benefits such as data consistency and global access, and provides best‑practice guidelines for using constants effectively in backend development.

BackendConstantsconst
0 likes · 4 min read
Understanding PHP Constants: Definition, Usage, and Best Practices
Java Tech Enthusiast
Java Tech Enthusiast
Sep 10, 2024 · Frontend Development

Prefer const over let in modern JavaScript/TypeScript

Modern JavaScript/TypeScript development should default to using const instead of let, because const enforces immutability, improves readability, and avoids bugs, while let is reserved only for truly mutable cases such as loop counters, with tools like ESLint’s prefer‑const rule helping enforce this practice.

TypeScriptbest practicesconst
0 likes · 7 min read
Prefer const over let in modern JavaScript/TypeScript
Liangxu Linux
Liangxu Linux
Sep 2, 2023 · Fundamentals

Mastering C Memory Layout: Stacks, Heaps, Segments, and const Usage

This article explains the five memory partitions in C, the storage regions created during compilation and linking, the different program segments (code, RO data, RW data, BSS, heap, stack), the proper use of const and pointers, 8051-specific memory qualifiers, and a detailed comparison of stack and heap allocation, including practical code examples.

C programmingData SegmentsHeap
0 likes · 25 min read
Mastering C Memory Layout: Stacks, Heaps, Segments, and const Usage
Open Source Linux
Open Source Linux
Aug 16, 2023 · Fundamentals

Mastering C Memory Layout: Stack, Heap, and Data Segments Explained

This article provides a comprehensive guide to C memory organization, covering the five primary memory regions, the layout of compiled C programs, detailed segment types such as code, read‑only, read‑write, BSS, heap and stack, as well as const usage, pointer rules, and embedded‑system storage qualifiers.

C programmingHeapStack
0 likes · 25 min read
Mastering C Memory Layout: Stack, Heap, and Data Segments Explained
php Courses
php Courses
Jul 5, 2023 · Frontend Development

Understanding var, let, and const in JavaScript

This article explains the differences between JavaScript's var, let, and const declarations, covering their scopes, hoisting behavior, and mutability, and provides clear code examples for each. It also highlights how const variables can still be modified when they hold objects or arrays, helping developers choose the right keyword for reliable code.

JavaScriptVarconst
0 likes · 5 min read
Understanding var, let, and const in JavaScript
AI Cyberspace
AI Cyberspace
Mar 4, 2023 · Fundamentals

Master C Variables, Constants, and Scope: From #define to static

This article explains C variables and constants, their three components, key differences, how to define symbolic constants with #define, use the const keyword, understand various scopes, the static storage class, and the distinction between declarations and definitions, all illustrated with code examples.

CConstantsVariables
0 likes · 12 min read
Master C Variables, Constants, and Scope: From #define to static
Full-Stack Trendsetter
Full-Stack Trendsetter
Jan 27, 2022 · Fundamentals

Understanding the Difference Between JavaScript Stack and Heap Memory

The article explains how JavaScript engines store variables in stack and heap memory, clarifies why const primitives are immutable while object properties can change, shows that new objects reside in heap, and discusses allocation efficiency and garbage‑collection behavior of both memory regions.

Garbage CollectionHeap MemoryJavaScript
0 likes · 5 min read
Understanding the Difference Between JavaScript Stack and Heap Memory
Sohu Tech Products
Sohu Tech Products
Dec 8, 2021 · Mobile Development

Understanding UIKIT_EXTERN and Macro Usage in iOS Development

This article explains the purpose, syntax, and underlying principles of UIKIT_EXTERN and related macros such as extern, static, and const in iOS, demonstrates how __attribute__ and visibility modifiers affect symbol linkage, and outlines practical scenarios and extensions for safer, more efficient code across dynamic libraries.

MacrosUIKIT_EXTERNconst
0 likes · 11 min read
Understanding UIKIT_EXTERN and Macro Usage in iOS Development
Python Crawling & Data Mining
Python Crawling & Data Mining
Nov 9, 2020 · Fundamentals

Master Go Functions: Scope, Defer, Panic & Recover Explained

This article delves into advanced Go function concepts, illustrating memory allocation diagrams, variable scopes, the use of const for globals, the behavior of defer statements, and handling errors with panic and recover, complete with code examples and visual outputs to deepen your understanding.

GoVariable Scopeconst
0 likes · 8 min read
Master Go Functions: Scope, Defer, Panic & Recover Explained
Baidu Intelligent Testing
Baidu Intelligent Testing
Aug 18, 2017 · Frontend Development

Practical Guide to ES6 Features and Performance Comparisons in Node.js

This article reviews the compatibility of various Node.js versions with ES6 features, explains key ES6 constructs such as let, const, template literals, default parameters, destructuring, and classes, and presents performance benchmarks comparing these features to their ES5 equivalents, concluding with practical recommendations for developers.

ClassJavaScriptNode.js
0 likes · 6 min read
Practical Guide to ES6 Features and Performance Comparisons in Node.js
Java High-Performance Architecture
Java High-Performance Architecture
Jun 10, 2017 · Frontend Development

Master 7 Essential ES6 Features in Just 30 Minutes

This concise guide introduces seven frequently used ES6 features—including let, const, arrow functions, default parameters, destructuring, object shorthand, and template literals—explaining each concept so you can grasp them in roughly half an hour.

Arrow FunctionsJavaScriptconst
0 likes · 1 min read
Master 7 Essential ES6 Features in Just 30 Minutes
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
May 25, 2017 · Frontend Development

Master Essential ES6 Features: Let/Const, Arrow Functions, Templates, and More

This article offers a practical guide to the most commonly used ES6 features—let/const, arrow functions, template literals, destructuring, default parameters, spread operator, object literals, and classes—explaining their syntax, behavior, and real‑world usage to help developers quickly master modern JavaScript.

Arrow FunctionsDestructuringTemplate literals
0 likes · 12 min read
Master Essential ES6 Features: Let/Const, Arrow Functions, Templates, and More