title: How can I simplify the code for multiple nested if else statements
body: <p>I am currently using the following code for comparison but as you can see, I am making tonnes of if else statements. Is there a way to simplify the code and make it more efficient?</p>
  
  <pre><code>getGenderRef: (grammer=nil) -&gt;
    @gender_ref = ""
    gender = this.get('gender')
    if gender? and gender == 'male'
      if grammer == 'he'
        @gender_ref = 'he'
      else if grammer == 'his'
        @gender_ref == 'his'
      else if grammer == 'him'
        @gender_ref == 'him'
    else if gender? and gender == 'female'
      if grammer == 'he'
        @gender_ref = 'she'
      else if grammer == 'his'
        @gender_ref == 'her'
      else if grammer == 'him'
        @gender_ref == 'her'
    else if gender? or gender == null
      if grammer == 'he'
        @gender_ref = 'he/she'
      else if grammer == 'his'
        @gender_ref == 'his/her'
      else if grammer == 'him'
        @gender_ref == 'him/her'
  </code></pre>