Variables in VBScript
While declaring a variable in JavaScript is optional, it is not in VBScript. You must use a Dim (for dimension) statement to first declare the variable.
<%
Dim animal
animal = "Zebra"
%>
To declare multiple variables, you can use a single Dim statement:
Dim customers, products, prices
So, remember that while declaring a variable is optional in JavaScript, it is not in VBScript.
VBScript Data Types
As in JavaScript, data are not typed. That is, the variables are “smart” and will change type with the context of their use. Also as in JavaScript, you can use HTML tags as values in VBScript.
<%
Dim newpar, one, two, three newpar = "<p>" one = "The loneliest number." two=222.222 three= 3 Response.write one Response.write ...
Get JavaScript Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.