@nickgravelyn With JS I always do, but for C# or Unreal I generally declare them at the top of the function
Declare a variable before you use it, or just assign it immediately when you declare it? Which do you prefer?
-
-
-
@DaveVoyles @nickgravelyn I pretty much always declare at first use when possible. If not possible, then as close to first use as I can. - Show replies
New conversation -
-
-
@nickgravelyn
@DaveVoyles Yep. A variable declared within an if statement for instance isn't available outside. Why declare it so it is? -
@KrisWD40 @nickgravelyn I mean in that case you would just declare it at the top of the function so it can be used within the entire thing
End of conversation
New conversation -
-
-
@nickgravelyn
@KrisWD40 I favor C# over it for a lot of reasons, BUT it's nice to just deploy in the browser, in secondsThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@DaveVoyles I have been declaring variables before using it in JS. -
@ShaneHenrikson on think it comes down to just a matter of preference for most
End of conversation
New conversation -
-
-
@nickgravelyn
@DaveVoyles : I do whatever Resharper tells me to do and it agrees with NickThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@DaveVoyles depends :)Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@nickgravelyn
@DaveVoyles U can change code in C# while it's debugging (you do need to break 1st). I use it in app dev, never tried w/ gamesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.