0 votes
24 views

What does the following code denote about index updation?

for (index in 1:3) {
index <- index * 2
print(index)
}
in Technology by (187k points)

1 Answer

0 votes
In a for-loop the index is updated at the beginning of each iteration. Therefore, reassigning the index symbol during one iteration doesn’t affect the following iterations.
by (187k points)

Related questions

0 votes
1 answer 23 views
0 votes
1 answer 23 views
0 votes
1 answer 22 views
0 votes
1 answer 13 views
0 votes
1 answer 22 views
22 views asked Oct 16, 2020 in Technology by JackTerrance (187k points)
0 votes
1 answer 20 views
20 views asked Oct 16, 2020 in Technology by JackTerrance (187k points)
+1 vote
1 answer 92 views
0 votes
1 answer 33 views
0 votes
1 answer 19 views
...