Objective-C: When to use braces in a For Loop declaration?

int example;
for (example = 0; example < 2; example++) {
NSLog(@"Value of example: %d", example);
NSLog(@"print a newline\n");
}
int example;
for (example = 0; example < 2; example++) {
NSLog(@"Value of example: %d", example);
}
int example;
for (example = 0; example < 2; example++)
NSLog(@"Value of example: %d", example);

--

--

--

Software Engineer (Android, iOS, Unity) | M.Sc. Computer Science — Technische Universitaet Berlin | Mobile Advertising, Attribution, Monetisation, UA & Analytic

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

So what is reactive web stack?

Setup Keycloak Cluster on OpenShift 3

Dark Side 104: Learning Linux Part 2

Functional Programming hubs and who is using it 👋

Setting Up a Shopify Theme Development Environment On Your Local Machine Using Theme Kit

Coding Interview Questions [Arrays]: Height Checker

Why we use Java at Jibit

Being Fast and Fluid as a Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Akarsh SEGGEMU

Akarsh SEGGEMU

Software Engineer (Android, iOS, Unity) | M.Sc. Computer Science — Technische Universitaet Berlin | Mobile Advertising, Attribution, Monetisation, UA & Analytic

More from Medium

Mooseman’s Records

An Online Community Brought to Life: DrupalCon Portland 2022

A light blue background with two photos: the photo on the lower left shows the Mediacurrent team in their booth at DrupalCon Portland. The photo on the upper right shows a claw machine and a banner advertising DrupalCon.

TURBOGEARS-Web Framework

The conflict of prefabrication