how to optimize this piece of JS code?
<p>Sorry JS newbie here:</p>

<pre><code>    if (message.notify_one_day_out){
        $("#data\\[User\\]\\[notify_one_day_out\\]").val("1");
    }
    else{
        $("#data\\[User\\]\\[notify_one_day_out\\]").val("0");
    }  
</code></pre>

<p>The above code feels sloppy. How can I condense it? I know this is development fundamentals but can I do something like:</p>

<pre><code>$("#data\\[User\\]\\[notify_one_day_out\\]").val(message.notify_one_day_out);
</code></pre>
