Block
The Block
function is used to create a scope, isolating the environment.
Parameters
The Block
function accepts any number of parameters.
Return Value
The Block
function returns the value of the last parameter, or Unit[]
if no parameters are provided.
Examples
Let[x, 2];
Print[x]; (* 2 *)
Block[
Let[x, 10],
Print[x], (* 10 *)
];
Print[x]; (* 2 *)