Hi,
if you want to use the variable in 1 workflow only use an instance variable :
instance.vars.myVariable = "blablabla";
you can find more details here : JavaScript scripts and templates https://helpx.adobe.com/campaign/kb/instance-variable-in-workflow.html
on the other hand, if what you are looking for is a variable to use across multiple workflows you have options :
getOption("myOption");
setOption("myOption", "bliblibli");
some examples in here : https://technowide.net/2017/02/28/options-store-configurations-ac/
Kind regards,
Pierre