Edit in JSFiddle

'use strict';
var stringList = [
    'hello 1',
    'hello 2',
    'hello 3',
    'hello 4',
    'hello 5'
];

var Say = function(string) {
	var content = string;
    var hello =  function (){
        return content;
    };
    return {
    	hello: hello
    };
};
var container = document.querySelector("#container");
while(stringList.length > 0) {
    (function () {
        var str = stringList.shift();
        var btn = document.createElement("BUTTON");
        btn.appendChild(document.createTextNode(str));
        var say = new Say(str);
        console.log(say.hello());
        btn.onclick = function() {
            alert(say.hello());
        };
        container.appendChild(btn);
    })()
}
<div id='container'></div>