how to build a javascript object using an array and the map function?
<p>I've got an <strong>array of channels</strong> that I want to transform into a <strong>single object</strong> (channelSettings) with a true / false <strong>property for each channel</strong>.  </p>

<p>I've got it working using the below code but it seems verbose.  Is there are way to do it without the "temp" var?  If I can get ride of that, then I could get ride of the self executing function as well.</p>

<pre><code>var channels = ["TV", "Billboard", "Spot TV"];


var channelSettings = function() {
    var temp = {};

    channels.map(function(itm, i, a) {
        var channel = itm.toLowerCase().replace(" ", "");
        temp[channel] = false;
    });

    return temp;
}();
</code></pre>

<p>I guess I'm trying to get the map function to return an object with properties instead of an array.  Is this possible?  Is it mis-guided?  Suggestions?</p>

<p>This is what I'm hoping it looks like in the end:</p>

<pre><code>var channels = ["TV", "Billboard", "Spot TV"];

var channelSettings = channels.map(function(itm, i, a) {
        var channel = itm.toLowerCase().replace(" ", "");
        return ????;
});
</code></pre>
