VBScript Multiple choices


Total available count: 25
Subject - Scripting Languages
Subsubject - VBScript

Which function is used to get the smallest subscript of an array in VBScript?


 

 

 

 



A


Solution:-

VBScript LBound Function
The LBound function returns the smallest subscript for the indicated dimension of an array. Note: The LBound for any dimension is ALWAYS and ALWAYS 0.

Tip: Use the LBound function with the UBound function to determine the size of an array.

VBScript LBound Function Syntax is as follows:

LBound(arrayname[,dimension])

arrayname:    arrayname is Required. The name of the array variable
dimension:    dimension is Optional. Which dimension's lower bound to return
first dimension = 1, second dimension = 2, and so on. Default is always 1

VBScript LBound Function Example is depicted as follows:

<%

Courses=Array("HTML","HTML5","CSS","jQuery","JavaScript","SQL","Oracle","Java")
response.write(LBound(Courses) & "<br />")
response.write(UBound(Courses) & "<br />")

%>

The output of the above code will be as follows:

0
7




Next 4 multiple choice(s)

1

How will you create dynamic-array variables in VBScript?

2

Which function is used to compare two strings in VBScript?

3

Which function is used to reverse String in VBscript?

4

Pick Out the correct way of creating an array in VBscript?

Comments