title: Adding If Condition
body: <p>I'm new in using jquery and i would like to ask what do you call this kind of statement where I want to add an If Statement inside </p>
  
  <p>btw. the Read here is Boolean and i want to change if <code>Read == true</code> <code>read: 'read'</code> and if false it becomes <code>unread: 'unread'</code></p>
  
  <p>This is my Original code:</p>
  
  <pre><code>var options = { id: ID,
                  read: Read == true ? 'unread' : 'read',
                  category: "projects",
                  message: Message
                  };
  </code></pre>
  
  <p>and my Trial but didn't succeeded :</p>
  
  <pre><code>var options = { 
         if(Read == true) { 
                      id: ID,
                      read: 'read',
                      category: "projects",
                      message: Message
                          } 
          else {
                      id: ID,
                      unread: 'unread',
                      category: "projects",
                      message: Message
               }
      };
  </code></pre>
  
  <p>having <code>expected identifier or string</code> in the <code>if</code> word</p>
  
  <p>Thanks in Advance </p>