Timeline for Making parameters required by using a function call as a default value in JavaScript
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 26, 2016 at 17:59 | vote | accept | Michał Perłakowski | ||
Dec 26, 2016 at 11:34 | history | tweeted | twitter.com/StackSoftEng/status/813347198838644736 | ||
Dec 25, 2016 at 19:08 | answer | added | Oriol | timeline score: 5 | |
Dec 25, 2016 at 18:31 | comment | added | Michał Perłakowski | @Caleb I'm not asking whether it is functionally different, but whether it is (more) readable. | |
Dec 25, 2016 at 17:41 | comment | added | Caleb | This looks fine to me. I do not think it is "functionally" any different than checking against undefined in the function itself. All I would recommend is that you keep it consistent across your code base. Good conventions will make your code easier to maintain. (Also, verify that the browsers you support have implemented this functionality.) | |
Dec 25, 2016 at 8:38 | history | edited | Michał Perłakowski | CC BY-SA 3.0 |
edited title
|
Dec 25, 2016 at 8:12 | history | asked | Michał Perłakowski | CC BY-SA 3.0 |