Storage Locations and Behavior of Structs, Mappings, and Arrays in Solidity
Introduction
In Solidity, data can exist in four primary locations: storage, memory, calldata, and stack. Structs, mappings, and arrays are classified as reference types, meaning their behavior depends on the data location in which they are declared ...