+ 2
Function rewrite
Hey everybody! Have stupud question as usually...and yeah,that's the best place for stupid questions :D So. As example : If we have some function like function makeStuff () { //makeStuff } And then i'll want to add stuff for it but in other file or some other place,doesn't realy matter - what i'll get? Like this: function makeStuff () { //MakeOtherStuff } Will it fully rewrite existing function or just add new stuff inside it ?
7 odpowiedzi
+ 2
@Brent Meeusen
Yep...tryed it bymyself already too :D
But whatever,i'll let this topic stay for other people, feel it pretty usefull to know.
Like half of year in js and never thought about it untill i found it usefull :D
Realy want to add stuff in functions ...meh...
(to move some stuff from it to other file,it became messy)
+ 2
@Brent Meeusen
Yeah,that's kinda helps ...in some dirty way :D
+ 2
I'll just show this...you'll get why I wanted to just add stuff in different files :D
It's like choise between making code dirty with alot of functions inside other functions or make code dirty with alot of code inside 1 function :D
But on practice - it's dirty cause of both things :D
Guess I'll just make main "draw" function clear with only quick calls.
http://savepic.net/9731484.htm
+ 2
@Brent Meeusen
Yeah...I did things like this before...never cared before completing about how it looks...
But with huge things it's even hard for you to find things you need in messy code...
+ 1
Hm...yeah,Guess should think about it too :D
+ 1
Aight,thanks for help , i'll keep doing nonsence....ehm...I meant...keep making this...thing...:D
0
Still feels messy :D
Even with just 64 lines in main file :D