Delete and default values
Reset value types to their Solidity defaults with delete.
Solidity 0.8.36REPL mode
Why use this example
Use this pattern to explore how Solidity represents typed values and how state-changing expressions affect storage. The entry isolates delete and default values so its input, result, and state changes stay easy to compare.
Solidity to run
uint256 public answer = 42
bool public ready = true
delete answer
delete ready
answer
readyOfficial Solidity reference
Compare this focused investigation with the complete language definition in the Solidity documentation.
Delete operatorWhat to expect
Deleting the state variables resets the uint256 to 0 and the boolean to false.
Continue the investigation
Change a value, add another expression, or open Inspect after the run. Accepted entries remain available to the next entry, and the clean replay keeps the complete result reproducible.
Read about state and storage Reproducible investigation