5
Sukhi
7y

if(){
}

or

if()
{
}

Comments
  • 8
    Depends on the language and coding standards everywhere.
  • 5
    I must say I'm a fan of the second. But I see most people using the first on if statements.
  • 4
    if ( condition )
    {

    }

    here
  • 5
    I use
    statement (condition)
    {
    [...]
    }
    too 😉
  • 2
    if( condition )
    {
    doThis();
    }
  • 3
    When I started programming I found the first one more convenient to read. But then I started using IDE's and their powerful formatters. And suddenly I was coding in each programming language according to their most common formatting practices. Means nowaday: it depends on the language.
  • 1
    totally depends... at university, we use the first one. when im at home or doing other side projects, both depending on what language or with whom i work with.
  • 1
    A == b? C : D;

    will be better 😂
  • 4
  • 4
    if (condition) //ur code
  • 1
    ()?:
Add Comment