Golang – labeled break and continue

break and continue are keywords that control the loop in many programming languages. The scope of those keywords is at inner most. Here is the example code of C++. In the example code above, break and continue will only affect the inner most loop which deals with the variable j. However, in golang, you can control the scope of break and continue keyword by using labels. Here is the example code. Let’s say there is a library of words and you are querying unique words. For example, when you query the word computer, it should return the first index of READ MORE