I am new to javascript but I am trying to have the default image set with the onload() and I don't think that it is reaching the image that I set up in the array and I cannot figure out why.

I am going to have it rotate images after I click on the button but I can't even get the default image to add.

```
var images = ['img/profile.jpg', 'img/mountain.jpg', 'img/sanfran.jpg'];
var num=1;

function loadPage()
{
    document.getElementById("pictures").src = images[0].src;
}

function nextImage(pictures)
{
    var img = document.getElementById("pictures");
    document.getElementById("pictures").src = images[1].src;
    console.log(num++); // I have this just to make sure that it is catching something
}

<div id="maincontent">
  <div id="pictures">
     <img src="img/mountain.jpg">
  </div>
  <div id="paragraph">
    <p>
    </p>
    <button onclick="nextImage()">Switch Images</button>
  </div>
</div>

```