The Ethereum Virtual Machine has three areas where it can store data- storage, memory  and the stack, which are explained in the following paragraphs.

・Storage - store in persistent storage on blockchain.

・Memory - contract obtains a freshly cleared instance for each message call.

・Stack - all computations are performed on a data area called the stack

possible > move stack elements to storage or memory impossible > to just access arbitrary elements deeper in the stack without first removing the top of the stack. .

Link

stored only during function execution.

contract Example {
	 uint256 thisIsAStack;
}

■ Good Article

Solidity supports three types of variables.

Screen Shot 2022-04-28 at 11.33.35.png