Golang Tutorial #10 – For Loops & While Loops

This golang tutorial covers for loops in the go programming language. Go’s implementation of for loops allows you to write them in many different ways and to use them as a while loops.

🎙 Subscribe to my second channel for weekly podcasts! https://www.youtube.com/channel/UCSATlCAUi7R0Ik-wsZb2gOA

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python
https://tech-with-tim.teachable.com/p/the-fundamentals-of-programming-with-python

📸 Instagram: https://www.instagram.com/tech_with_tim
🌎 Website https://techwithtim.net
📱 Twitter: https://twitter.com/TechWithTimm
⭐ Discord: https://discord.gg/pr2k55t
📝 LinkedIn: https://www.linkedin.com/in/tim-ruscica-82631b179/
📂 GitHub: https://github.com/techwithtim
🔊 Podcast: https://anchor.fm/tech-with-tim

💵 One-Time Donations: https://www.paypal.com/donate/?token=m_JfrPK7DsK4PLk0CxNnv4VPutjqSldorAmgQIQnMozUwwQw93vdul-yhU06IwAuig15uG&country.x=CA&locale.x=
💰 Patreon: https://www.patreon.com/techwithtim
◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡

⭐ Tags ⭐
– Tech With Tim
– Golang For Loops
– Go Programming For Loops
– For Loops Golang
– Golang Tutorial
– Go Programming Tutorial

⭐ Hashtags ⭐
#GO #Golang

source by Tech With Tim

go programming language

Mourad ELGORMA

Mourad ELGORMA

Fondateur de summarynetworks, passionné des nouvelles technologies et des métiers de Réseautique , Master en réseaux et système de télécommunications. ,j’ai affaire à Pascal, Delphi, Java, MATLAB, php …Connaissance du protocole TCP / IP, des applications Ethernet, des WLAN …Planification, installation et dépannage de problèmes de réseau informatique……Installez, configurez et dépannez les périphériques Cisco IOS. Surveillez les performances du réseau et isolez les défaillances du réseau. VLANs, protocoles de routage (RIPv2, EIGRP, OSPF.)…..Manipuler des systèmes embarqués (matériel et logiciel ex: Beaglebone Black)…Linux (Ubuntu, kali, serveur Mandriva Fedora, …). Microsoft (Windows, Windows Server 2003). ……Paquet tracer, GNS3, VMware Workstation, Virtual Box, Filezilla (client / serveur), EasyPhp, serveur Wamp,Le système de gestion WORDPRESS………Installation des caméras de surveillance ( technologie hikvision DVR………..). ,

25 réflexions sur “Golang Tutorial #10 – For Loops & While Loops

  • Avatar
    avril 9, 2021 à 9:21
    Permalien

    can someone wish me luck for tomorrow. i was given a task to develop a small web service that works with picture by the company i interviewed with. Tomorrow is the day that i have to present to them. i developed the micro service using golang.

    Répondre
  • Avatar
    avril 9, 2021 à 9:21
    Permalien

    I was wondering if you'll notice that all numbers which are divisible by 9, are also divisible by 3 😁
    Anyways thanks for tutorials!

    Répondre
  • Avatar
    avril 9, 2021 à 9:21
    Permalien

    Yo tim, when you finish this series Can you make series about python hacking?….

    Répondre
  • Avatar
    avril 9, 2021 à 9:21
    Permalien

    Correction. Instead of x != 0, just put x > 0. It does the same as x != 0, just makes it more reliable and less prone to possible outcome errors 🙂

    EDITED:
    Not only does it make it more reliable, but it is just the norm in programming to check values with >, <, >=, <=. Usually == and != are used when strictly checking a value without checking other values. Yes, in this case we might be strictly checking if the value of x is not zero, but normally a program like this is much more complex, therefore strictly checking is not the norm because it is more prone to outcome erros.

    Répondre
  • Avatar
    avril 9, 2021 à 9:21
    Permalien

    Tim this is a great series I'm really enjoying learning Go. This is my second language after python and I enjoy seeing the differences between the two. You have helped me learn a ton so keep up the good work!

    Répondre
  • Avatar
    avril 9, 2021 à 9:21
    Permalien

    When printing out the numbers divisible by 3, 7, and 9, do you need to put continue at the end? You don't have to right?

    Répondre
  • Avatar
    avril 9, 2021 à 9:21
    Permalien

    Hey Tim, I implemented the code but even If we don't use the ""continue"" the answer is same… The loop prints the same things… can you clarify more about the continue

    Répondre
  • Avatar
    avril 9, 2021 à 9:21
    Permalien

    i have a question, so i try this nested for with 2 different style, but the output its somewhat different,

    1st style :

    for i:=1; i <= 5; i++{

    fmt.Println(i)

    for j:=21; j <= 24; j++ {

    println(j)

    for k:=11; k<=14; k++ {

    fmt.Println(k)

    }

    }

    }

    2nd style :

    i:=1

    j:=21

    k:=11

    for i <= 5{

    fmt.Println(i)

    i++

    for j <= 24 {

    println(j)

    j++

    for k<=14 {

    fmt.Println(k)

    k++

    }

    }

    }

    Répondre

Laisser un commentaire