Question: I'm currently trying to make the function below work correctly. Recently added the IF ELSE variables to it, and after the my script no longer works. If I remove it of course, everything goes back to normal, minus that feature of course. What am I doing wrong exactly? Thanks in advance!

```
var image3 = $("#image3");

$(function() {
 $("#ID-OF-LINK-1").click(function() {
        $("#image1").attr("src","./image1.jpg");
        $("#image2").attr("src","./image2.jpg");
            if (image3.src != "./image3.jpg"){
                ("#image3").attr("src","./image4.jpg"); }
            else
                ("#image3").attr("src","./image3.jpg"); }
  })

})

```

Answer: 
Mis-matched curly braces. You need another opening curly brace after the "else". Try this:

```
var image3 = $("#image3");

$(function() {
 $("#ID-OF-LINK-1").click(function() {
        $("#image1").attr("src","./image1.jpg");
        $("#image2").attr("src","./image2.jpg");
            if (image3.src= "./image3.jpg"){
                ("#image3").attr("src","./image4.jpg"); }
            else {
                ("#image3").attr("src","./image3.jpg"); }
  })

})

```
As @Will Martin pointed out, you missed the matching curly brace.

Consider using [Douglas Crockford's JavaScript code conventions](http://javascript.crockford.com/code.html), which include using curly braces with every part of a conditional statement. This practice might help you avoid these sorts of errors, e.g.:

```
//...
if (image3.src != "./image3.jpg") {
  ("#image3").attr("src","./image4.jpg");
} else {
  ("#image3").attr("src","./image3.jpg");
}

```