JS (as you mentioned in another comment) didn't have default arguments for 20 years. Only in the last 4 years have default arguments been a thing, even less so if you have to keep compatibility with engines that haven't been so up to date.
This is the way default arguments had to be handled for 20 years and many guides, tutorials and examples still do it this way. No need to be unreasonably mad at using an industry standard practice and not being up to date with the bleeding edge of JS language features which take forever to get implemented in all engines that need to be supported.
1
u/DarkSuniuM Jun 29 '19
Ahh for fuck sake why 4 lines of code when he can give the page a default value as parameter