What is the correct way of creating functions in VBScript?
The most common way or method to define a function in VBScript is by using the Function keyword, followed by a unique function name and it may or may not carry a list of parameters and a statement with an End Function keyword. End Function keyword indicates the end of the function.
The basic syntax for the function is shown below?
<!DOCTYPE html>
<html>
?<body>
? ?<script language = "vbscript" type = "text/vbscript">
? ? Function Functionname(parameter-list)
? ? ? statement 1
? ? ? statement 2
? ? ? statement 3
? ? ? statement 4
? ? ? statement 5
? ? ? .......
? ? ? statement n
? ? End Function
? </script>
?</body>
</html>
The basic Example for the function is shown below
<!DOCTYPE html>
<html>
?<body>
? ?<script language = "vbscript" type = "text/vbscript">
? ? Function HelloSlightBook()
? ? ? msgbox("Hello Welcome to the Slight Book World!")
? ? End Function
? </script>
?</body>
</html>
Which function is used to release the memory acquired by an array variable in VBScript?
Which function is used to check that a variable is in array or not in VBScript?
Which function is used to get a subset of an array in VBScript?
Which function is used to get a combined string from an array of string in VBScript?
Which function is used to split a string into an array in VBScript?