What’s the significance of this syntax? Well, here’s what you should know about for loop syntax that you want to use with Golang maps:
If the condition is available, then the loop will execute as long as the condition remains true. If the for clause that is (init; condition; increment) here’s how the loop will be executed:

• The init step will be executed first, and only once. You can declare and initialize any of your loop control variables. Program statements are placed in this section as long as the semicolon exists.

• Next, the condition will be evaluated. If the condition is true, then the body of for loop will be executed. On the other hand, if the condition is false, the body of the loop will not run and flow of the program will jump to the next program statement just after the loop.

• After the body of for loop has executed the flow of program will jump back up to the increment statement.

• The condition of your loop will now be evaluated again. If it’s true, then the loop will execute, and the process repeats itself until the condition becomes false, after which for loop is terminated.

• If the range is specified, then for loop will execute for each data item that’s in the range. Otherwise, if it’s not specified then your loop will execute in the normal way.

So, how can you modify the above code to use for loops? Here’s how your code should look like if you wish to use for loops in Golang maps:
Here’s an example of how you can use loops for your arrays in Golang: