well without the brachets it didnt work..
you guys are confusing me...
Printable View
well without the brachets it didnt work..
you guys are confusing me...
Omits any UNIX hidden files (ones that start with a .). This includes the directories "." and "..".Quote:
if (strpos($file, '.') === 0) continue;
What else DOES that do?
Hm, I always rely on indentation for this. Otherwise one has to keep track of every single brace in order to know exactly how many levels deep one is.Quote:
I find the brackets still helpful if skimming quickly (as if to find a section of the code).
But omitting a semicolon in Javascript is bad because it can lead to the code looking like it does something completely different to what it actually does:Quote:
Also, the real reason for including it is to be absolutely correct. I see omitting the brackets as a shortcut, just like omitting the ; in javascript.
... and is inserted anyway. Omitting a brace isn't nearly so ambiguous, especially with proper indentation, and doesn't make extra work for the compiler/interpreter.Code:var a = 3,
b = 1 + a
(b - 4) && doSomething()
No, I actually accidentally left one in (the last one, I was editing your code, and it was outside the visible area of my textbox).Quote:
thankyou you forgot to put some '{' in there but i got it thankyou..
Don't mind us, we just went off on a tangent about coding style :)Quote:
well without the brachets it didnt work..
you guys are confusing me...
omg i understood that... thankyou... i learned that in math.. lol