100% found this document useful (1 vote)
226 views1 page

Comparison

The document compares JavaScript and Visual Basic, noting that JavaScript is case-sensitive while Visual Basic is not, JavaScript uses var to declare variables and semicolons while Visual Basic uses dim and statements end on new lines, and that JavaScript combines strings and variables with + while Visual Basic uses &. It also compares functions, if/else statements, arrays, and for loops between the two languages.

Uploaded by

John Busby
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
226 views1 page

Comparison

The document compares JavaScript and Visual Basic, noting that JavaScript is case-sensitive while Visual Basic is not, JavaScript uses var to declare variables and semicolons while Visual Basic uses dim and statements end on new lines, and that JavaScript combines strings and variables with + while Visual Basic uses &. It also compares functions, if/else statements, arrays, and for loops between the two languages.

Uploaded by

John Busby
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Comparison

JS
Case-sensitive Supported by most browsers, phones and tablets Declare a variable with: var Statements end with ; // 1 line comment starts w slashes OR /* multi-line comment goes here and ends when you finally type */ Combine strings and variables by placing a the two. Example:

VB
Not case-sensitive Only works in Internet Explorer Declare a variable with: dim Statements end when a new line begins ' ' ' ' comments begin with apostrophe no multi-line comments in VB so just put an apostrophe every time

+ between

Combine a string and variable by placing Example:

& in the middle.

ans9.innerHTML = "My name is " + studentName;

ans9.innerHTML = "My name is " & studentName

function

p2

Sub

fred
One or more statements

One or more statements;

}
if(x<y){
One or more statements;

end sub If
x<y

Then

One or more statements

} else {
One or more different statements;

Else
One or more different statements

End If
newVBArray = Split(nameOfSomeString,"*") For i=Lbound(arrayName) to Ubound(arrayName)
One or more statements;

}
var newJSArray = nameOfSomeString

.split("*");

for(i=0;i<arrayName.length;i++){
One or more statements;

}
os = theArrayFromAnEarlierSplit

Next

[i];

os = theArrayFromAnEarlierSplit

(i)

You might also like