how to print a name varible in alert message js code example Example: javascript alert variable var text = "hello world"; alert(text);