how to use variables in alert code example Example: javascript alert variable var text = "hello world"; alert(text);