From Test-Scratch-Wiki
The Answer is a value that is the latest input into the Ask () and Wait block.
It was introduced in Scratch 1.4.
Related Blocks
The following blocks can be used in conjunction with this value:
— The stage monitor and reporter block that reports the value of the answer
— Sets the value to something which the user inputs
Resetting the Answer
Offline, the answer can be reset (made blank) by pressing either the green flag or stop sign.
Online, there is no way to reset the answer variable itself without using another variable and pretending that variable is the answer block.
Example Uses
As this value stores inputted text, it is very useful where a script has to refer to what has been inputted. For example, there are chatbots that let the Scratcher input their name — if the script needed to see the name, the Answer value could be used.
Some common uses for the Answer value:
- Storing information (such as in projects that require a name to be inputted)
- Recalling information (such as when the name must be retrieved)
- When a setting has been inputted with the Ask () and Wait block, keeping the selecting setting somewhere