js how to get variable from alert code example Example: javascript alert variable var text = "hello world"; alert(text);