Variables in JavaScript


Variables in VBScript

 

SOUCE CODE:
<h3>Variables in JavaScript</h3>
<script language = "javascript">
var strP, intQ, intP, intC, strN, strE, b;
b = "<br>";
intQ = 5;
intP = 2;
strN = "Robert Schmidt";
strE = "robert@company.com";
strP = "Oatmeal Cookies";
intC = (intP * intQ);
document.write("You ordered " + intQ + " of ");
document.write(strP + " for " + strN + b);
document.write("The Price of each " + strP);
document.write(" is $" + intP + b);
document.write("Your total cost is $" + intC + b);
document.write("A confirmation of your order ");
document.write("was sent to " + strE);
</script>
<hr>
<h3>Variables in VBScript</h3>
<script language = "vbscript">
dim strP, intQ, intP, intC, strN, strE, b
b = "<br>"
intQ = 5
intP = 2
strN = "Robert Schmidt"
strE = "robert@company.com"
strP = "Oatmeal Cookies"
intC = (intP * intQ)
document.write("You ordered " & intQ & " of ")
document.write(strP & " for " & strN & b)
document.write("The Price of each " & strP)
document.write(" is $" & intP & b)
document.write("Your total cost is $" & intC & b)
document.write("A confirmation of your order ")
document.write("was sent to " & strE)
</script>