I always prefer ternaries in cases like these, but if you prefer this that's fine with me too

```
var method = id in this.colorMap ? '_updateRules' : '_createRules';
this[method](calendar, id, color);
```