Code :: blocks - Operational Symbols inquiry

I have a quick question : does it really matter in this case to put it like this or not?

Thanks

Hey @fegroucheadnane,

  • I don’t know what you are reffering at, but I think you’re referring to the curly braces on the function. It doesn’t really matter where you put your curly braces.
  • You can put it in the same line of the function like this:
/* I'm using JavaScript as an example, but it also applies to any C based
programming languages which JavaScript is, and what it seems like C++ on your image */
function myFunc() {
  //codes here
}
  • Or you can put it on its own line, ex:
function myFunc()  
{
//codes here
}
  • It doesn’t really matter where you put it, just make sure if you picked a style, to be CONSISTENT with it.
1 Like

Hello @Catalactics,

Thank you for your insight and now I am fully aware of what you are talking about above.

1 Like