title: changing image with javascript within if/else
body: <p>I am trying to change an image in my HTML, via an If/else statement, so the page displays an image depending on a value from another script
  i currently have this code</p>
  
  <pre><code>&lt;script&gt;
        if (b.className="yes") {
      img src="Site/assets/HappyObama.jpg"
  } 
  else {
      img src="Site/assets/SadObama.jpg"
  }   
  </code></pre>
  
  <p></p>
  
  <p>how can i fix this? Is there something within Javascript that does this? </p>