If you need to calculate a value and save it for online reporting, for data exports or for use in the survey logic, you can store it in a hidden question. A hidden question is an ordinary survey question with the hidden property set. This will not be displayed to the respondent, but can be referenced like any other question.
If you need to store temporary values e.g. as part of a calculation in a script, use a variable or constant within the script. The scope of a variable or constant used in Forsta Plus is limited. It can only be accessed within the script node or validation code where it is defined. So if you need to access it later in the questionnaire, use a hidden question. A hidden question can be accessed from anywhere in the questionnaire.