Go Memory Allocation: var, new, and make Explained
In Go, the keywords var, new, and make are used for memory allocation, but they serve different purposes. Understanding their behavior is essential for writing correct and efficient Go code.
Using var with different types
When you declare a variable with var, the type determines whether it gets a zero value or nil.
var ptr *int
fmt.Println(ptr) ...
Posted on Tue, 18 Aug 2026 16:54:32 +0000 by daria
JavaScript Variable Declarations: Demystifying var, let, and the Temporal Dead Zone
JavaScript Variable Declarations: Demystifying var, let, and the Temporal Dead Zone
Effective variable management is fundamental to writing robust JavaScript applications. Before ES2015 (ES6), the var keyword was the sole option for declaring variables. ES6 introduced let and const, which brought significant improvements, particularly concernin ...
Posted on Sun, 28 Jun 2026 16:20:23 +0000 by Admiral S3