What does it mean to use Ember.K in an if statement? What are some other common ways of using Ember.K?
ember.js
Solution
So does it mean that the if statement basically turns into `if (true)...`:
Yep, that's exactly what it means.
What are some other uses of Ember.K?
That's basically it. Think of `Ember.K` as a placeholder used in a base class when defining hooks that should be defined by child classes. Like the `activate` and `deactivate` hooks in route.js
Problem
Ember.K is an empty function, simply containing `return this`. I observed it used in an if statement of a filter function for saving changes to EmberData. This is the filter function: ``` if (adapter.shouldSave(record)) { filteredSet.add(record); } ``` In adapters (such as localstorage adapter) that lack their own implementations of `shouldSave()`, the generic `shouldSave()` of just `Ember.K` is used. So does it mean that the if statement basically turns into: ``` if (true) { filteredSet.add(record); } ``` and the `record` is always added to the `filteredSet`. Please correct me if I'm wrong. What are some other uses of Ember.K?