x
 
<!DOCTYPE html>
<html>
<head>
<title>JS tutorial</title>
<style type="text/css">
body {
    margin-top:20px;
    background-color:#ffa;
}
</style>
<script type="text/javascript">
    var val1 = "x";
    var val2 = 20;
    var val3 = 2;
    document.write("1. The result of <i>'++"+val1+"'</i> equals <b>" + (++val1) + "</b><br />");
    document.write("2. The result of <i>'("+val2+"--)+"+val3+"'</i> equals <b>" + ((val2--)+val3) + "</b><br />"); 
    val2++; // recovery
    document.write("3. The result of <i>'(--"+val2+")+"+val3+"'</i> equals <b>" + ((--val2)+val3) + "</b><br />"); 
    ++val2; // recovery
    document.write("4. The result of <i>'"+val2+" = "+-val2+"'</i> equals <b>" + (val2 = -val2) + "</b><br />");
</script>   
</head>
<body>
</body>
</html>