3 ms·
1. Because maybe the author wanted to keep the property hidden and only expose a getter function and hide the setter? 2. Same reason. They are being set interna
by emonidi 11y ago
1. Because maybe the author wanted to keep the property hidden and only expose a getter function and hide the setter?
2. Same reason. They are being set internally. A sane programmer would not give you the power to do that because its a product of internal calculations.
3. Naming of method/function and variables is the second hardest thing in programming :)
4. The callback of on.('floor_button_pressed') gives you an floorNumber argument which is more than sufficient. What event in real life would you describe with on('in-droor-button-press') ?