Computer Science, asked by Jsjsjsjsjs, 1 year ago

What is the use of STEP statement in FOR... NEXT?

Answers

Answered by dipti8
25
"STEP" is use to repeats the statement in a specified number of times.
Answered by Sahil1711
17
For...Next Statement works well when you can associate each iteration of a loop with a control variable and determine that variable's initial and final values. However, when you are dealing with a collection, the concept of initial and final values isn't meaningful, and you don't necessarily know how many elements the collection has. In this kind of case, a For Each...Next loop is often a better choice.
' Create a list of strings by using a ' collection initializer. Dim lst As New List(Of String) _ From {"abc", "def", "ghi"} ' Iterate through the list. For Each item As String In lst Debug.Write(item & " ") Next Debug.WriteLine("") 'Output: abc def ghi

mark as brainliest
Similar questions