Telegram Group & Telegram Channel
Какие варианты циклов есть в Go

1. Классический for
for i := 0; i < 10; i++ {
fmt.Println(i)
}


2. Условный for (как while)

i := 0
for i < 10 {
fmt.Println(i)
i++
}


3. Бесконечный цикл
for {
fmt.Println("infinite loop")
break // не забудь выйти
}


4. for range — итерация по коллекции
for index, value := range []string{"a", "b", "c"} {
fmt.Println(index, value)
}


🐸Библиотека Go для собеса
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/go_interview_lib/833
Create:
Last Update:

Какие варианты циклов есть в Go

1. Классический for

for i := 0; i < 10; i++ {
fmt.Println(i)
}


2. Условный for (как while)

i := 0
for i < 10 {
fmt.Println(i)
i++
}


3. Бесконечный цикл
for {
fmt.Println("infinite loop")
break // не забудь выйти
}


4. for range — итерация по коллекции
for index, value := range []string{"a", "b", "c"} {
fmt.Println(index, value)
}


🐸Библиотека Go для собеса

BY Библиотека Go для собеса | вопросы с собеседований


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/go_interview_lib/833

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

If riding a bucking bronco is your idea of fun, you’re going to love what the stock market has in store. Consider this past week’s ride a preview.The week’s action didn’t look like much, if you didn’t know better. The Dow Jones Industrial Average rose 213.12 points or 0.6%, while the S&P 500 advanced 0.5%, and the Nasdaq Composite ended little changed.

Newly uncovered hack campaign in Telegram

The campaign, which security firm Check Point has named Rampant Kitten, comprises two main components, one for Windows and the other for Android. Rampant Kitten’s objective is to steal Telegram messages, passwords, and two-factor authentication codes sent by SMS and then also take screenshots and record sounds within earshot of an infected phone, the researchers said in a post published on Friday.

telegram from sg


Telegram Библиотека Go для собеса | вопросы с собеседований
FROM USA