April 4, 2022, 12:09 a.m. | Davmi Jose Valdez Ogando

DEV Community dev.to

Continuation of Hacking With Swift 100 Days of Swift


Day 4 - Looooooooops



  1. For loops
    For loops are done on a python way (maybe swift did it first?) but without the required indentation. So if you want to loop through [1,2,3,4] you'd do:

    for number in [1,2,3,4] {
    print(number)
    }



PS: Discard (the underscore _ ) is accepted if you don't want/need the actual variable



  1. While loops

    Nothing fancy to see here


  2. Repeat Loops

    Basically do whiles


  3. Breaking and skipping …

swift

SOC 2 Manager, Audit and Certification

@ Deloitte | US and CA Multiple Locations

Information Security Engineers

@ D. E. Shaw Research | New York City

Intermediate Security Engineer, (Incident Response, Trust & Safety)

@ GitLab | Remote, US

Journeyman Cybersecurity Triage Analyst

@ Peraton | Linthicum, MD, United States

Project Manager II - Compliance

@ Critical Path Institute | Tucson, AZ, USA

Junior System Engineer (m/w/d) Cyber Security 1

@ Deutsche Telekom | Leipzig, Deutschland