3 ms·
It's not broken when you understand that functions are objects and default parameters are just members of those objects. Each time the function is executed you
by hueving 12y ago
It's not broken when you understand that functions are objects and default parameters are just members of those objects. Each time the function is executed you get local vars that point to these object members. If one is a mutable type, any changes you make to it will then obviously persist.