Re:Plottable.js – Flexible, interactive charts for the web
by talldan on Monday September 05, 2016 @12:40PM
(#12431150)
It feels complicated due to not using separate getter and setter functions. By splitting it into two functions the annotations could be reduced as well. I wonder what the reason for not taking that approach was.
[ Parent
| on HN ]
Re:Plottable.js – Flexible, interactive charts for the web
by chrismorgan on Monday September 05, 2016 @04:21PM
(#12432042)
It’s common in JavaScript to have method overloading for getters and setters like this. jQuery is probably the best-known example; .css('property') is a getter and .css('property', value) a setter.