Ymerla,
<button>click</button>
<div></div>
<script>
(function () {
var mas = ['lorem', 'ipsum', 'dolore', 'sit', 'amet'];
var n = 0;
var but = document.getElementsByTagName("button")[0];
var div = document.getElementsByTagName("div")[0];
but.onclick = function () {
div.innerHTML = mas[n % mas.length];
n++;
}
but.click();
})();
</script>