var my-variable = '';
This would set the variable's content to an empty string. The first time you use a variable, its a good idea to declare it first, this is done using var in front of it. Following uses of the variable doesn't need the var part.
Variables not working?
Keep in mind that variables need to exist before you can use them. So don't declare them in the body, to try and use them in the head, it will not work. The scripts in the body are loaded after the scripts in the head.
Below is an example throwing out a popup with a message contained in a variable. This is done by first creating a user function, and then calling it using the onclick event on a button.