javascript for alert code example Example 1: js alert alert("Hello! I am an alert box!!"); Example 2: javascript alert alert(varible);