all InfoSec news
100 Days of Swift - Day 4
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
- 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
While loops
Nothing fancy to see hereRepeat Loops
Basically do whilesBreaking and skipping …
More from dev.to / DEV Community
Jobs in InfoSec / Cybersecurity
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