+ 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 ?

16th Aug 2017, 11:24 PM
Rose Sevenyears
Rose  Sevenyears - avatar
7 Answers
+ 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)
16th Aug 2017, 11:30 PM
Rose Sevenyears
Rose  Sevenyears - avatar
+ 2
@Brent Meeusen Yeah,that's kinda helps ...in some dirty way :D
16th Aug 2017, 11:35 PM
Rose Sevenyears
Rose  Sevenyears - avatar
+ 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
16th Aug 2017, 11:39 PM
Rose Sevenyears
Rose  Sevenyears - avatar
+ 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...
16th Aug 2017, 11:43 PM
Rose Sevenyears
Rose  Sevenyears - avatar
+ 1
Hm...yeah,Guess should think about it too :D
16th Aug 2017, 11:46 PM
Rose Sevenyears
Rose  Sevenyears - avatar
+ 1
Aight,thanks for help , i'll keep doing nonsence....ehm...I meant...keep making this...thing...:D
16th Aug 2017, 11:54 PM
Rose Sevenyears
Rose  Sevenyears - avatar
0
Still feels messy :D Even with just 64 lines in main file :D
21st Aug 2017, 4:07 AM
Rose Sevenyears
Rose  Sevenyears - avatar