Restrict length of loop in names.length


if i create an array of length 5 and want to print them to length 3 only
what shuld i do to i<name.length…names.length[3]doesnt work


you can simply check that i is lesser then 3 in the loop condition?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.