Timeline for Local user registration
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 10, 2020 at 13:24 | history | edited | CommunityBot |
Commonmark migration
|
|
Jan 6, 2014 at 21:02 | vote | accept | Loki Astari | ||
Jan 6, 2014 at 21:00 | comment | added | Loki Astari | OK. Java Expert redeemed. My interpretation of his instructions was off. I have fixed my assumptions. | |
Jan 3, 2014 at 22:43 | history | edited | Dan | CC BY-SA 3.0 |
added 4 characters in body
|
Jan 3, 2014 at 22:40 | comment | added | Dan |
@Loki: Read about scoping in JS. All variables declared with var (or function , for that matter) are local to the function they are declared inside of. So in your case named functions will be local to updateUser and getSavedUser , so there can be no clash with other parts of code. Moreover, what you declare inside NodeJS module is local to that module, unless you put it in exports . So no, it isn't a problem.
|
|
Jan 3, 2014 at 22:31 | comment | added | Loki Astari | Thanks. Working through your comments. I was told by another JS expert to avoid named functions (ie prefer anonymous) as the names can potentially clash with other code (which is a real problem as the code grows in size). In your second example are the names not exposed beyond the module? or is there a technique to make them not exposed further? | |
Jan 3, 2014 at 16:07 | history | edited | Dan | CC BY-SA 3.0 |
added 70 characters in body
|
Jan 3, 2014 at 16:01 | history | edited | Dan | CC BY-SA 3.0 |
added 98 characters in body
|
Jan 3, 2014 at 15:55 | history | edited | Dan | CC BY-SA 3.0 |
added 290 characters in body
|
Jan 3, 2014 at 15:47 | history | answered | Dan | CC BY-SA 3.0 |