How to assign a value to object property via anonymous function?
<p>Let's say I have a function that takes parameters.</p>

<p>In this case I am using <a href="https://github.com/liabru/jquery-match-height" rel="nofollow noreferrer">matchHeight</a>, but my question is general.</p>

<p>I set all the options in a variable like this.</p>

<pre><code>var options = {
    byRow:    true,
    property: 'height',
    remove:   true,
};
</code></pre>

<p>And then pass it to the function:</p>

<pre><code>$('.some_class').matchHeight(options);
</code></pre>

<p>Now, I would like to be able to evaluate the 'remove' property dynamically using a function. My guess was using something like this:</p>

<pre><code>var options = {
    byRow:    true,
    property: 'height',
    // remove:   true,
    remove: function(){ return true; }
};
</code></pre>

<p>But, it doesn’t work. What's the correct way to do this?
UPDATE: to be more clear. matchHeight takes remove as a <a href="https://github.com/liabru/jquery-match-height#usage" rel="nofollow noreferrer">boolean property</a>, not as a function.</p>

<p>My primary object is to 'emulate' a boolean value such as <code>remove: true</code> using a function.</p>